Buildings that provide free buildings (e.g. The Great Library) now deal with civ uniques (e.g. Paper Maker)
This commit is contained in:
parent
324176d098
commit
de4c042dd5
1 changed files with 10 additions and 2 deletions
|
@ -216,8 +216,16 @@ class Building : NamedStats(), IConstruction{
|
|||
}
|
||||
construction.addBuilding(name)
|
||||
|
||||
if (providesFreeBuilding != null && !construction.builtBuildings.contains(providesFreeBuilding!!))
|
||||
construction.addBuilding(providesFreeBuilding!!)
|
||||
if (providesFreeBuilding != null && !construction.containsBuildingOrEquivalent(providesFreeBuilding!!)) {
|
||||
var buildingToAdd = providesFreeBuilding!!
|
||||
|
||||
for(building in GameBasics.Buildings.values)
|
||||
if(building.replaces == buildingToAdd && building.uniqueTo==civInfo.civName)
|
||||
buildingToAdd = building.name
|
||||
|
||||
construction.addBuilding(buildingToAdd)
|
||||
}
|
||||
|
||||
when {
|
||||
"Empire enters golden age" in uniques-> civInfo.goldenAges.enterGoldenAge()
|
||||
"Free Great Artist Appears" in uniques-> civInfo.addGreatPerson("Great Artist")
|
||||
|
|
Loading…
Reference in a new issue