mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 06:16:37 -04:00
fix duplicated city-state bonus bug (#5042)
* fix city-state bug * pt 2
This commit is contained in:
parent
248145cf8f
commit
cd7bd8fcfd
@ -1160,11 +1160,11 @@ class CivilizationInfo {
|
|||||||
if (!isCityState())
|
if (!isCityState())
|
||||||
return false
|
return false
|
||||||
val eraInfo = getEraObject()
|
val eraInfo = getEraObject()
|
||||||
val bonuses = if (eraInfo == null) null
|
val allyBonuses = if (eraInfo == null) null
|
||||||
else eraInfo.allyBonus[cityStateType.name]
|
else eraInfo.allyBonus[cityStateType.name]
|
||||||
if (bonuses != null) {
|
if (allyBonuses != null) {
|
||||||
// Defined city states in json
|
// Defined city states in json
|
||||||
bonuses.addAll(eraInfo!!.friendBonus[cityStateType.name]!!)
|
val bonuses = allyBonuses + eraInfo!!.friendBonus[cityStateType.name]!!
|
||||||
for (bonus in bonuses) {
|
for (bonus in bonuses) {
|
||||||
if (statType == Stat.Happiness && bonus.getPlaceholderText() == "Provides [] Happiness")
|
if (statType == Stat.Happiness && bonus.getPlaceholderText() == "Provides [] Happiness")
|
||||||
return true
|
return true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user