def checkUnits(self):
for pUnit, pPlot in list((pUnit, pUnit.plot()) for pUnit in self.iterateUnits()):
if pPlot.getFeatureType() == eForest:
if pPlot.isNone() or pUnit.isDead(): continue
if isEnemyTerritory(pUnit, pPlot, self.pCivPlayer.get(CyTeam)) or self.isUsed(pUnit): return
self.activateOverwatch(pUnit, pPlot)
break
x = 0
y = 0
VP = (x,y)
while VP <= (82, 51):
VP = (x, y)
if y == 51:
x =+ 1
y = 0
else:
y += 1
These tuples are supposed to be map coordinates. The only valid one seems to be (19, 36) and I have no idea what those others are all about.(884927088, -65210) (-2147483647, -2147483647) (-2147483647, -2147483647) (1166766952, 1166763784) (19, 36) (-2147483647, -2147483647)
if pPlot.getFeatureType() == eForest:
if pPlot.isNone() or pUnit.isDead(): continue
def checkUnits(self):
for pUnit, pPlot in list((pUnit, pUnit.plot()) for pUnit in self.iterateUnits()):
[B]if pPlot.isNone() or pUnit.isDead(): continue[/B]
if pPlot.getFeatureType() == eForest:
if isEnemyTerritory(pUnit, pPlot, self.pCivPlayer.get(CyTeam)) or self.isUsed(pUnit): return
self.activateOverwatch(pUnit, pPlot)
break
I don't think that the invalid plot coordinates are the problem - they are more likely just a symptom of invalid CyUnit and/or CyPlot entries.I say that in the datastorage there should be very long tuple of tuples which consists of every coordinate possible... and then pPlot i schecked against these?
def FreeCivic():
bBasic = True
pPlayer = gc.getPlayer(eRome)
if [COLOR="Red"][B]B[/B][/COLOR]basic [COLOR="Red"][B]=[/B][/COLOR] True:
pCivic = gc.getInfoTypeForString('CIVIC_REPUBLIC')
if pPlayer.isCivic(pCivic):
pPlayer.setCivics(0, pCivic)
showPopup(senateHeader, freeCivicMessage)
else:
print "No usable civic for FreeCivic()"
else:
pass
def process():
if not CatapultOverwatch.bEnabled: return
[B]lDeletePlayers = list()[/B]
for ePlayer, pCatapultOverwatch in overwatchDict.iteritems():
debug(ePlayer, pCatapultOverwatch)
if not pCatapultOverwatch.pCivPlayer.isAlive():
[B]lDeletePlayers.append(ePlayer)[/B]
elif not pCatapultOverwatch.constructionTimer():
pCatapultOverwatch.checkUnits()
[B]for ePlayer in lDeletePlayers:
del overwatchDict[ePlayer][/B]
def process():
if not CatapultOverwatch.bEnabled: return
for ePlayer, pCatapultOverwatch in overwatchDict.iteritems():
debug(ePlayer, pCatapultOverwatch)
if not pCatapultOverwatch.pCivPlayer.isAlive():
[B]del overwatchDict[ePlayer][/B]
elif not pCatapultOverwatch.constructionTimer():
pCatapultOverwatch.checkUnits()