mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-09 07:18:57 +07:00

* Renamed and added doc comments for some some can-pass-through functions * Moved a city-state pass-through exception to a lower-level function Moved the exception that players (but not AI) can always pass through city-states from TileInfo.canCivPassThrough to CivilizationInfo.canPassThroughTiles (which is called by the former). This makes the behavior of the latter function accurate to its name, and makes the code more understandable overall. A side-effect of this change is that functions that used the lower-level CivilizationInfo.canPassThroughTiles function directly now consider the aforementioned exception. For example, if a city-state expands its border, it should now no longer push out units of a player civilization. It may make even more sense to move the exception to the "canMoveTo" logic, since AI should probably be able to pass through city-state tiles even when they don't want to end on them. That might however affect the AI more significantly. * Fixed bug where units would not enter a city upon capture As listed in #4697. * Fixed a bug where captured units were pushed out of captured cities Before, capturing a city with a civilian unit in it would cause the capturing military unit to enter the city but also cause the civilian unit to leave the city. Now, the civilian unit stays in the city as well.