j_mie6
Deity
hmmm thats odd can you post the for loop of mine that you were using?
for i in range(21):
pPlot = pCity.getCityIndexPlot(i)
Thanks for the complements.
No idea either, because I seldom use that city index for loop myself.
Only saw it being used by jamie for his natural wonder codes, so use it to replace my own for loop since it seems shorter.
But if it is causing problems, try using my original loop:
Code:iX = pCity.getX() iY = pCity.getY() for x in range(iX - 2, iX + 3): for y in range(iY - 2, iY + 3): if abs(x - iX) != 2 or abs(y - iY) != 2: pPlot = CyMap().plot(x,y) if pPlot.isWater() and pPlot.getBonusType(-1) == -1: randBonus = CyGame().getSorenRandNum(15, "Freebie") if randBonus < 3: pPlot.setBonusType(MarineResource[randBonus]) pPlot.setImprovementType(fboat) CyInterface().addMessage(iPlayer,true,15,CyTranslator().getText("TXT_TSUKIJI_BONUS",(gc.getBonusInfo(MarineResource[randBonus]).getDescription(),)),'',0, gc.getBonusInfo(MarineResource[randBonus]).getButton(),ColorTypes(11), x, y, true,true) ## Tsukiji Fish Market End ##
It may be clearer if you enable python exceptions to see exactly which line went wrong because the list index may be pointing to MarineResource rather than the for loop
This is under onBuildingBuilt, the rest of the codes shouldn't be causing problems.
pPlot.setBonusType(MarineResource[randBonus])
pPlot.setBonusType(MarineResource[randBonus])
# Volkshalle Wonder Start
def anger_check(iPlayer):
pPlayer = gc.getPlayer(iPlayer)
iRefCityList = PyPlayer(iPlayer).getCityList()
b_Volkshalle = gc.getInfoTypeForString("BUILDING_VOLKSHALLE")
obsoleteTech = gc.getBuildingInfo(b_Volkshalle).getObsoleteTech()
if ( gc.getTeam(pPlayer.getTeam()).isHasTech(obsoleteTech) == false or obsoleteTech == -1 ):
for pyCity in iRefCityList:
pCity = pyCity.GetCy()
if pCity.getNumActiveBuilding(b_Volkshalle) == 1:
for pyCity in iRefCityList:
pCity = pyCity.GetCy()
anger = pCity.getDefyResolutionAngerTimer()
if (anger > 0):
pCity.changeDefyResolutionAngerTimer(-anger)
# Volkshalle Wonder End