Lets go onZuu wrote:Or maybe I should start to write in grey.

Now seriously. I've done what I can with the city search. But the tiles of inapropriate cityes doesn't seem to be replaced. Have look at screenshot and code. On screenshot, the red coordinates should have been deleted. But you can see the red-x coords again in the y part - when the should've been gone.
In code, function starts at line 334.
Code: Select all
tile_list.Valuate(AIMap.GetTileX); //Set values to X coordinates
AILog.Warning("X AXIS:");
foreach(tile, axis in tile_list){
if(abs(axis-townX)>range) { //If the distance is more than range...
tile_list.RemoveValue(tile); //... remove it with no mercy! --this line maybe do not work
local city = town_list.GetValue(tile); //<--this seems to be 0 always. Also very strange.
AILog.Error("["+AIMap.GetTileX(tile)+"x"+AIMap.GetTileY(tile)+"]");
}
else AILog.Info("["+AIMap.GetTileX(tile)+"x"+AIMap.GetTileY(tile)+"]");
}