mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-12 00:39:56 +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:
@ -216,8 +216,16 @@ class Building : NamedStats(), IConstruction{
|
|||||||
}
|
}
|
||||||
construction.addBuilding(name)
|
construction.addBuilding(name)
|
||||||
|
|
||||||
if (providesFreeBuilding != null && !construction.builtBuildings.contains(providesFreeBuilding!!))
|
if (providesFreeBuilding != null && !construction.containsBuildingOrEquivalent(providesFreeBuilding!!)) {
|
||||||
construction.addBuilding(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 {
|
when {
|
||||||
"Empire enters golden age" in uniques-> civInfo.goldenAges.enterGoldenAge()
|
"Empire enters golden age" in uniques-> civInfo.goldenAges.enterGoldenAge()
|
||||||
"Free Great Artist Appears" in uniques-> civInfo.addGreatPerson("Great Artist")
|
"Free Great Artist Appears" in uniques-> civInfo.addGreatPerson("Great Artist")
|
||||||
|
Reference in New Issue
Block a user