City IDing

bane_

Howardianism High-Priest
Joined
Nov 27, 2013
Messages
1,559
Do razed city ID's get reused?

I ask this because of possible conflicts with new cities getting razed cities' ID and there having no hook for when a city is/was razed. Since this conflict arose from code optimization, having a PlayerDoTurn for every player check each turn for cities being razed (possible) is out of the question.
 
Do razed city ID's get reused?
Eventually. But basically you can't rely on them NOT being reused.

having no hook for when a city is/was razed
You can use GameEvents.SetPopulation(iX, iY, iOldPopulation, iNewPopulation) - as the city prekill method calls setPopulation(0)
 
Top Bottom