diff --git a/core/src/com/unciv/logic/city/City.kt b/core/src/com/unciv/logic/city/City.kt index be0a837ab2..cda96355ee 100644 --- a/core/src/com/unciv/logic/city/City.kt +++ b/core/src/com/unciv/logic/city/City.kt @@ -95,7 +95,7 @@ class City : IsPartOfGameInfoSerialization, INamed { var unitShouldUseSavedPromotion = HashMap() - var cityUnitPromotions = HashMap() + var unitToPromotions = HashMap() @delegate:Transient val neighboringCities: List by lazy { @@ -159,7 +159,7 @@ class City : IsPartOfGameInfoSerialization, INamed { toReturn.manualSpecialists = manualSpecialists toReturn.connectedToCapitalStatus = connectedToCapitalStatus toReturn.unitShouldUseSavedPromotion = unitShouldUseSavedPromotion - toReturn.cityUnitPromotions = cityUnitPromotions + toReturn.unitToPromotions = unitToPromotions return toReturn } diff --git a/core/src/com/unciv/logic/city/CityConstructions.kt b/core/src/com/unciv/logic/city/CityConstructions.kt index b4e985a2d8..180169cfbc 100644 --- a/core/src/com/unciv/logic/city/CityConstructions.kt +++ b/core/src/com/unciv/logic/city/CityConstructions.kt @@ -469,7 +469,7 @@ class CityConstructions : IsPartOfGameInfoSerialization { // Check if the player want to rebuild the unit the saved promotion // and null check. // and finally check if the current unit has enough XP. - val savedPromotion = city.cityUnitPromotions[unit.baseUnit.name] + val savedPromotion = city.unitToPromotions[unit.baseUnit.name] if (city.unitShouldUseSavedPromotion[unit.baseUnit.name] == true && savedPromotion != null && unit.promotions.XP >= savedPromotion.XP) { diff --git a/core/src/com/unciv/ui/screens/pickerscreens/PromotionPickerScreen.kt b/core/src/com/unciv/ui/screens/pickerscreens/PromotionPickerScreen.kt index 63b0a23aa7..7e6da2611d 100644 --- a/core/src/com/unciv/ui/screens/pickerscreens/PromotionPickerScreen.kt +++ b/core/src/com/unciv/ui/screens/pickerscreens/PromotionPickerScreen.kt @@ -214,7 +214,7 @@ class PromotionPickerScreen private constructor( if (unitCurrentCity != null) { // If you are clicked the save unitType promotion, you want the next unitType to have the same promotion. unitCurrentCity.unitShouldUseSavedPromotion.put(unit.baseUnit.name,true) - unitCurrentCity.cityUnitPromotions.put(unit.baseUnit.name,unit.promotions) + unitCurrentCity.unitToPromotions.put(unit.baseUnit.name,unit.promotions) } } }