Minor Annoyance
Deity
Here's the code that counts forests and jungles to get the global warming defence value:
Now I want to determine the owner of the plot selected and then check their civics to see if they are running environmentalism. If they are, then add a value saved in GlobalDefinesAlt to iGlobalWarmingDefence, otherwise just add 1 like normal. Using this should get me the plots owner:
but I don't know what to use with eCulturalOwner to extract a true/false for them running environmentalism. I haven't been able to find somewhere in the code that checks for a specific civic so I can copy it. Anyone seen what I'm looking for?
Code:
int iGlobalWarmingDefense = 0;
for (int i = 0; i < GC.getMapINLINE().numPlotsINLINE(); ++i)
{
CvPlot* pPlot = GC.getMapINLINE().plotByIndexINLINE(i);
if (pPlot->getFeatureType() != NO_FEATURE)
{
if (GC.getFeatureInfo(pPlot->getFeatureType()).getGrowthProbability() > 0)
{
++iGlobalWarmingDefense;
}
}
}
Code:
eCulturalOwner = pPlot->calculateCulturalOwner()