I'm working through a terraforming mod that I found, and am trying to find a way to have the game assign the correct Forest graphic depending on the latitude of the plot being modified.
Here's the exisitng code from CvEventManager that takes care of replacing the improvement that just got "built" with the Forest feature:
Unfortunately, as written, the above code can't accommodate for the fact that game uses different graphics at different latitudes. So, how could I get the latitude of the plot being modified? The logic to apply the different graphics I've already got worked out, but I need a way to quantify what the actual latitude is...
Thanks in advance!
Here's the exisitng code from CvEventManager that takes care of replacing the improvement that just got "built" with the Forest feature:
Code:
if(iImprovement==gc.getInfoTypeForString('IMPROVEMENT_FOREST')):
pPlot = CyMap().plot(iX, iY)
CyInterface().addMessage(CyGame().getActivePlayer(),True,25,'A tree nursery has matured into a Forest!','AS2D_DISCOVERBONUS',1,'Art/Interface/Buttons/TerrainFeatures/Forest.dds',ColorTypes(8),iX,iY,True,True)
pPlot.setFeatureType(gc.getInfoTypeForString('FEATURE_FOREST'), 0)
pPlot.setImprovementType(-1)
Unfortunately, as written, the above code can't accommodate for the fact that game uses different graphics at different latitudes. So, how could I get the latitude of the plot being modified? The logic to apply the different graphics I've already got worked out, but I need a way to quantify what the actual latitude is...
Thanks in advance!