mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-25 04:43:05 -04:00
Allow loading games where a buildings' "replaces" has been removed
This commit is contained in:
parent
a5a2157bc6
commit
5e87950bf2
@ -580,7 +580,8 @@ class Civilization : IsPartOfGameInfoSerialization {
|
||||
}
|
||||
|
||||
fun getEquivalentBuilding(baseBuilding: Building): Building {
|
||||
if (baseBuilding.replaces != null)
|
||||
if (baseBuilding.replaces != null
|
||||
&& baseBuilding.replaces in gameInfo.ruleset.buildings)
|
||||
return getEquivalentBuilding(baseBuilding.replaces!!)
|
||||
|
||||
for (building in cache.uniqueBuildings)
|
||||
|
Loading…
x
Reference in New Issue
Block a user