Infixo / Civ6-Real-Fixes

Civ6 mod with gameplay and technical fixes
https://steamcommunity.com/sharedfiles/filedetails/?id=2956875836
1 stars 1 forks source link

(#308) Opponent's Secret Society is always known #24

Closed Infixo closed 1 year ago

Infixo commented 1 year ago

https://github.com/civfanatics/CQUI_Community-Edition/issues/308

On the DiploScreen, there is information about opponent's Secret Society. There is a bug in the Lua code that causes it always to be known, even in the situation when we actually have not yet discovered it.

The bug is here, file DiplomacyActionView_SecretSocietyRow.lua. If the opponent has the SS, then there is a check if we are aware of it. However, wrong object is used and the game actually if the opponent is aware of if, which ofc is always true.

if eSecretSociety ~= -1 then
    local pLocalPlayer:table = Players[Game.GetLocalPlayer()];
    local pLocalPlayerGovs:table = pSelectedPlayer:GetGovernors(); -- !!! It should be pLocalPlayer:GetGovernors() !!!

    if pLocalPlayerGovs:IsAwareOfSecretSociety(eSecretSociety) then
        -- Known Secret Society

Edit. This is a bug in a small, separate file. No need to add it to CQUI. I am moving this issue to Real Fixes.

Infixo commented 1 year ago

Fixed here: 6b0bde463570eba1d7a3916eea864926815c8c47