mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-20 04:38:18 +07:00
Genericified 'free [unit] appears]
This commit is contained in:
@ -366,13 +366,14 @@ class Building : NamedStats(), IConstruction{
|
||||
}
|
||||
|
||||
if ("Empire enters golden age" in uniques) civInfo.goldenAges.enterGoldenAge()
|
||||
if ("Free Great Artist Appears" in uniques) civInfo.addGreatPerson("Great Artist", cityConstructions.cityInfo)
|
||||
for(unique in uniques) if(unique.equalsPlaceholderText("Free [] appears")){
|
||||
val unitName = unique.getPlaceholderParameters()[0]
|
||||
civInfo.addGreatPerson(unitName, cityConstructions.cityInfo)
|
||||
}
|
||||
if ("2 free Great Artists appear" in uniques) {
|
||||
civInfo.addGreatPerson("Great Artist", cityConstructions.cityInfo)
|
||||
civInfo.addGreatPerson("Great Artist", cityConstructions.cityInfo)
|
||||
}
|
||||
if ("Free Great General appears near the Capital" in uniques) civInfo.addGreatPerson("Great General", civInfo.getCapital())
|
||||
if ("Free great scientist appears" in uniques) civInfo.addGreatPerson("Great Scientist", cityConstructions.cityInfo)
|
||||
if ("2 free great scientists appear" in uniques) {
|
||||
civInfo.addGreatPerson("Great Scientist", cityConstructions.cityInfo)
|
||||
civInfo.addGreatPerson("Great Scientist", cityConstructions.cityInfo)
|
||||
|
@ -201,6 +201,7 @@ object TranslationFileWriter {
|
||||
val parameterName = when{
|
||||
parameter.toIntOrNull() != null -> "amount"
|
||||
RulesetCache.getBaseRuleset().terrains.containsKey(parameter) -> "terrain"
|
||||
RulesetCache.getBaseRuleset().units.containsKey(parameter) -> "unit"
|
||||
else -> "param"
|
||||
}
|
||||
stringToTranslate = string.replace(parameters[0], parameterName)
|
||||
|
Reference in New Issue
Block a user