mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-20 19:56:51 +01:00
updated variable name
This commit is contained in:
parent
58c806c184
commit
94b21ca75e
|
|
@ -95,7 +95,7 @@ class City : IsPartOfGameInfoSerialization, INamed {
|
|||
|
||||
var unitShouldUseSavedPromotion = HashMap<String, Boolean>()
|
||||
|
||||
var cityUnitPromotions = HashMap<String, UnitPromotions>()
|
||||
var unitToPromotions = HashMap<String, UnitPromotions>()
|
||||
|
||||
@delegate:Transient
|
||||
val neighboringCities: List<City> 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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user