Hi. I added some code to a map script to replace all plains cows with grassland deer in forest. It works great EXCEPT for some instances of plains cow near starting settler. Now my problem is I don't know if it a) I can't alter terrain in view of the units, or b) it was added there by some default normalizing routine. If it's b, can anyone tell me what and how I overwrite it? if it's a, anyone got any ideas how to remedy this?
I put the code in def findStartingPlot(argsList)
I put the code in def findStartingPlot(argsList)
Code:
map = CyMap()
userInputPlots = map.getCustomMapOption(0)
iW = map.getGridWidth()
iH = map.getGridHeight()
seaCheck = map.getSeaLevel()
tvbCheck = map.getCustomMapOption(0)
if (seaCheck == 0) and (tvbCheck == 1):
for y in range(iH):
for x in range(iW):
pPlot = map.plot(x,y)
if pPlot.getTerrainType() == 1:
if pPlot.getBonusType(-1) == 12:
pPlot.setBonusType(-1)
pPlot.setTerrainType(0, true, true)
pPlot.setFeatureType(4, 1)
pPlot.setBonusType(14)