no message
This commit is contained in:
parent
81b29a5b57
commit
eba3aa3033
3 changed files with 4 additions and 3 deletions
|
@ -70,7 +70,7 @@ class CityConstructions {
|
|||
|
||||
fun isBuilt(buildingName: String): Boolean = builtBuildings.contains(buildingName)
|
||||
|
||||
fun isBuilding(buildingName: String): Boolean = currentConstruction == buildingName
|
||||
fun isBeingConstructed(constructionName: String): Boolean = currentConstruction == constructionName
|
||||
|
||||
internal fun getConstruction(constructionName: String): IConstruction {
|
||||
if (GameBasics.Buildings.containsKey(constructionName))
|
||||
|
|
|
@ -179,7 +179,7 @@ class Building : NamedStats(), IConstruction{
|
|||
.any {it.cityConstructions.isBuilt(name)})
|
||||
return false
|
||||
|
||||
if(civInfo.cities.any { it!=construction.cityInfo && it.cityConstructions.isBuilding(name) })
|
||||
if(civInfo.cities.any { it!=construction.cityInfo && it.cityConstructions.isBeingConstructed(name) })
|
||||
return false
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ class Building : NamedStats(), IConstruction{
|
|||
if (requiredBuildingInAllCities != null && civInfo.cities.any { !it.cityConstructions.containsBuildingOrEquivalent(requiredBuildingInAllCities!!) })
|
||||
return false
|
||||
if(requiredBuildingInAllCities!=null && civInfo.cities.any {
|
||||
it.cityConstructions.isBuilding(name) || it.cityConstructions.isBuilt(name)
|
||||
it.cityConstructions.isBeingConstructed(name) || it.cityConstructions.isBuilt(name)
|
||||
})
|
||||
return false
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ class ConstructionsTable(val cityScreen: CityScreen) : Table(CameraStageBaseScre
|
|||
pickProductionButton.add(buttonText.toLabel().setFontColor(Color.WHITE))
|
||||
pickProductionButton.onClick {
|
||||
cityScreen.city.cityConstructions.currentConstruction = construction
|
||||
cityScreen.city.cityStats.update()
|
||||
cityScreen.update()
|
||||
}
|
||||
if(construction==cityScreen.city.cityConstructions.currentConstruction)
|
||||
|
|
Loading…
Reference in a new issue