mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-05 21:11:35 +07:00
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
@ -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 New Issue
Block a user