Checking if a Resolution is currently in effect

Harkodos

Warlord
Joined
Feb 9, 2016
Messages
195
Hello again, I've got another problem that needs addressing. I'm currently trying to work out how to determine if a Resolution is currently in effect, and if so, then to display a message on the TopPanel. Working through it, I've technically succeeded, but not in the entire manner that I'd like.

The code I've currently got:
Code:
        -- Check for Resolutions
        local iMemberDiscoveredTechMod = 0;

        for pResolution in GameInfo.Resolutions() do
            local iResolution = pResolution.ID;
            pLeague = Game.GetLeague();

            if (pLeague ~= nil) then
                if (pLeague:GetActiveResolutions(iResolution)) then

                    -- Other Civilization discovered Tech Science mod
                    if (pResolution.MemberDiscoveredTechMod ~= 0) then
                        iMemberDiscoveredTechMod = iMemberDiscoveredTechMod + pResolution.MemberDiscoveredTechMod;
                    end
                end
            end
        end
As I've determined the GetActiveResolutions code will display any Resolutions that can currently be Enacted/Repealed, but I want to specifically only display the Resolution on the TopPanel if it has been Enacted and is currently in effect. From what little I've gathered on the Forum, this part of the code is rather "Modder-Un-Friendly," but perhaps there is a way?
 
Sorry to bump this thread, but after a week with no replies, I thought I'd just check in to see if anyone is at least pondering my predicament. Any insight at all would be much appreciated (such as a command that might help me a bit better than GetActiveResolution; if one exists that is).
 
Top Bottom