chore: Added explicit unit consumption to Settlers' Found City unique

This commit is contained in:
Yair Morgenstern
2023-03-02 22:07:34 +02:00
parent 64925adc7e
commit a1453a8b37
4 changed files with 5 additions and 3 deletions

View File

@ -15,7 +15,7 @@
"unitType": "Civilian", "unitType": "Civilian",
"movement": 2, "movement": 2,
"cost": 106, "cost": 106,
"uniques": ["Founds a new city", "Excess Food converted to Production when under construction", "uniques": ["Founds a new city <by consuming this unit>", "Excess Food converted to Production when under construction",
"Requires at least [2] population"], "Requires at least [2] population"],
"hurryCostModifier": 20 "hurryCostModifier": 20
}, },

View File

@ -15,7 +15,7 @@
"unitType": "Civilian", "unitType": "Civilian",
"movement": 2, "movement": 2,
"cost": 106, "cost": 106,
"uniques": ["Founds a new city", "Excess Food converted to Production when under construction", "uniques": ["Founds a new city <by consuming this unit>", "Excess Food converted to Production when under construction",
"Requires at least [2] population"], "Requires at least [2] population"],
"hurryCostModifier": 20 "hurryCostModifier": 20
}, },

View File

@ -132,7 +132,7 @@ class RulesetValidator(val ruleset: Ruleset) {
val vanillaRuleset = RulesetCache.getVanillaRuleset() // for UnitTypes fallback val vanillaRuleset = RulesetCache.getVanillaRuleset() // for UnitTypes fallback
if (ruleset.units.values.none { it.hasUnique(UniqueType.FoundCity) }) if (ruleset.units.values.none { it.hasUnique(UniqueType.FoundCity, StateForConditionals.IgnoreConditionals) })
lines += "No city-founding units in ruleset!" lines += "No city-founding units in ruleset!"
for (unit in ruleset.units.values) { for (unit in ruleset.units.values) {

View File

@ -202,6 +202,8 @@ object UnitActions {
return UnitAction( return UnitAction(
type = UnitActionType.FoundCity, type = UnitActionType.FoundCity,
title = if (!hasActionModifiers) UnitActionType.FoundCity.value
else "${UnitActionType.FoundCity.value} ${getSideEffectString(unique)}",
uncivSound = UncivSound.Chimes, uncivSound = UncivSound.Chimes,
action = { action = {
// check if we would be breaking a promise // check if we would be breaking a promise