mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Fixed crash when selecting certain buildings in the civilopedia (#4819)
This commit is contained in:
parent
bf40779605
commit
6d04bf424b
@ -1125,14 +1125,14 @@
|
|||||||
"culture": 3,
|
"culture": 3,
|
||||||
"happiness": 1,
|
"happiness": 1,
|
||||||
"specialistSlots": {"Artist": 1},
|
"specialistSlots": {"Artist": 1},
|
||||||
"uniques": ["Unbuildable"]
|
"uniques": ["Unbuildable", "Hidden when religion is disabled"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Monastery",
|
"name": "Monastery",
|
||||||
"cost": 0,
|
"cost": 0,
|
||||||
"culture": 2,
|
"culture": 2,
|
||||||
"faith": 2,
|
"faith": 2,
|
||||||
"uniques": ["[+1 Culture, +1 Faith] from [Wine] tiles [in this city]",
|
"uniques": ["[+1 Culture, +1 Faith] from [Wine] tiles [in this city]", "Hidden when religion is disabled",
|
||||||
"[+1 Culture, +1 Faith] from [Incense] tiles [in this city]","Unbuildable"]
|
"[+1 Culture, +1 Faith] from [Incense] tiles [in this city]","Unbuildable"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1141,7 +1141,7 @@
|
|||||||
"culture": 2,
|
"culture": 2,
|
||||||
"faith": 3,
|
"faith": 3,
|
||||||
"happiness": 1,
|
"happiness": 1,
|
||||||
"uniques": ["Unbuildable"]
|
"uniques": ["Unbuildable", "Hidden when religion is disabled"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Pagoda",
|
"name": "Pagoda",
|
||||||
@ -1149,6 +1149,6 @@
|
|||||||
"culture": 2,
|
"culture": 2,
|
||||||
"faith": 2,
|
"faith": 2,
|
||||||
"happiness": 2,
|
"happiness": 2,
|
||||||
"uniques": ["Unbuildable"]
|
"uniques": ["Unbuildable", "Hidden when religion is disabled"]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -203,7 +203,7 @@ class Building : NamedStats(), INonPerpetualConstruction, ICivilopediaText {
|
|||||||
override fun canBePurchasedWithStat(cityInfo: CityInfo, stat: Stat, ignoreCityRequirements: Boolean): Boolean {
|
override fun canBePurchasedWithStat(cityInfo: CityInfo, stat: Stat, ignoreCityRequirements: Boolean): Boolean {
|
||||||
if (stat == Stat.Gold && isAnyWonder()) return false
|
if (stat == Stat.Gold && isAnyWonder()) return false
|
||||||
// May buy [buildingFilter] buildings for [amount] [Stat] [cityFilter]
|
// May buy [buildingFilter] buildings for [amount] [Stat] [cityFilter]
|
||||||
if (cityInfo.getMatchingUniques("May buy [] buildings for [] [] []")
|
if (!ignoreCityRequirements && cityInfo.getMatchingUniques("May buy [] buildings for [] [] []")
|
||||||
.any { it.params[2] == stat.name && matchesFilter(it.params[0]) && cityInfo.matchesFilter(it.params[3]) }
|
.any { it.params[2] == stat.name && matchesFilter(it.params[0]) && cityInfo.matchesFilter(it.params[3]) }
|
||||||
) return true
|
) return true
|
||||||
return super.canBePurchasedWithStat(cityInfo, stat, ignoreCityRequirements)
|
return super.canBePurchasedWithStat(cityInfo, stat, ignoreCityRequirements)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user