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:
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?
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