Buildings that are missing resources are still displayed in city constructions

This commit is contained in:
Yair Morgenstern 2020-07-23 12:54:26 +03:00
parent 7d360e5fa1
commit 1a558a70d2
4 changed files with 4 additions and 5 deletions

View File

@ -29,7 +29,7 @@
"name": "Stone Works", "name": "Stone Works",
"happiness": 1, "happiness": 1,
"production": 1, "production": 1,
"requiredNearbyImprovedResources": ["Marble","Stone"], "requiredNearbyImprovedResources": ["Marble", "Stone"],
"resourceBonusStats": {"production": 1}, "resourceBonusStats": {"production": 1},
"maintenance": 1, "maintenance": 1,
"hurryCostModifier": 25, "hurryCostModifier": 25,

View File

@ -1067,7 +1067,7 @@
"interceptRange": 2, "interceptRange": 2,
"cost": 375, "cost": 375,
"requiredTech": "Combustion", "requiredTech": "Combustion",
"uniques": ["Can attack submarines","[40]% chance to intercept air attacks","May withdraw before melee"], // todo: add bonus vs submarines "uniques": ["Can attack submarines", "[40]% chance to intercept air attacks", "May withdraw before melee"], // todo: add bonus vs submarines
"hurryCostModifier": 20 "hurryCostModifier": 20
}, },
{ {

View File

@ -233,6 +233,7 @@ class Building : NamedStats(), IConstruction{
val rejectionReason = getRejectionReason(cityConstructions) val rejectionReason = getRejectionReason(cityConstructions)
return rejectionReason=="" return rejectionReason==""
|| rejectionReason.startsWith("Requires") || rejectionReason.startsWith("Requires")
|| rejectionReason.startsWith("Consumes")
|| rejectionReason == "Wonder is being built elsewhere" || rejectionReason == "Wonder is being built elsewhere"
} }

View File

@ -86,9 +86,7 @@ class BaseUnit : INamed, IConstruction {
return unit return unit
} }
override fun canBePurchased(): Boolean { override fun canBePurchased() = true
return true
}
override fun getProductionCost(civInfo: CivilizationInfo): Int { override fun getProductionCost(civInfo: CivilizationInfo): Int {
var productionCost = cost.toFloat() var productionCost = cost.toFloat()