mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-04 22:50:50 +07:00
Updated TranslationFileWriter to include the new values that filters can have (#4402)
* Updated TranslationFileWriter to include the new values that filters can have * Implemented requested changes
This commit is contained in:
parent
ced85fafd1
commit
21eadb39ff
@ -139,7 +139,7 @@
|
||||
"policies": [
|
||||
{
|
||||
"name": "Organized Religion",
|
||||
"uniques": ["[+1 Happiness] from every [Monument]","[+1 Happiness] from every [Temple]",
|
||||
"uniques": ["[+1 Happiness] from every [Monument]","[+1 Happiness] from every [Amphitheater]",
|
||||
"[+1 Happiness] from every [Monastery]"],
|
||||
"row": 1,
|
||||
"column": 2
|
||||
@ -152,7 +152,7 @@
|
||||
},
|
||||
{
|
||||
"name": "Theocracy",
|
||||
"uniques": ["+[10]% [Gold] from every [Temple]"],
|
||||
"uniques": ["+[10]% [Gold] from every [Amphitheater]"],
|
||||
"requires": ["Organized Religion"],
|
||||
"row": 2,
|
||||
"column": 1
|
||||
|
@ -197,21 +197,50 @@ object TranslationFileWriter {
|
||||
var parameterName = when {
|
||||
parameter.toIntOrNull() != null -> "amount"
|
||||
Stat.values().any { it.name == parameter } -> "stat"
|
||||
RulesetCache.getBaseRuleset().terrains.containsKey(parameter) -> "terrain"
|
||||
RulesetCache.getBaseRuleset().terrains.containsKey(parameter)
|
||||
|| parameter == "Friendly Land"
|
||||
|| parameter == "Foreign Land"
|
||||
|| parameter == "Fresh water"
|
||||
|| parameter == "non-fresh water"
|
||||
|| parameter == "Open Terrain"
|
||||
|| parameter == "Rough Terrain"
|
||||
-> "terrain"
|
||||
RulesetCache.getBaseRuleset().units.containsKey(parameter) -> "unit"
|
||||
RulesetCache.getBaseRuleset().tileImprovements.containsKey(parameter) -> "tileImprovement"
|
||||
RulesetCache.getBaseRuleset().tileImprovements.containsKey(parameter)
|
||||
|| parameter == "Great Improvement"
|
||||
-> "tileImprovement"
|
||||
RulesetCache.getBaseRuleset().tileResources.containsKey(parameter) -> "resource"
|
||||
RulesetCache.getBaseRuleset().technologies.containsKey(parameter) -> "tech"
|
||||
RulesetCache.getBaseRuleset().unitPromotions.containsKey(parameter) -> "promotion"
|
||||
RulesetCache.getBaseRuleset().buildings.containsKey(parameter)
|
||||
|| parameter == "Wonders" -> "building"
|
||||
|| parameter == "Wonders"
|
||||
|| parameter == "Wonder"
|
||||
|| parameter == "Buildings"
|
||||
|| parameter == "Building"
|
||||
-> "building"
|
||||
|
||||
UnitType.values().any { it.name == parameter } || parameter == "Military" -> "unitType"
|
||||
UnitType.values().any { it.name == parameter }
|
||||
|| parameter == "Military"
|
||||
|| parameter == "Civilian"
|
||||
|| parameter == "non-air"
|
||||
|| parameter == "relevant"
|
||||
|| parameter == "Nuclear Weapon"
|
||||
|| parameter == "Submarine"
|
||||
// These are up for debate
|
||||
|| parameter == "Air"
|
||||
|| parameter == "land units"
|
||||
|| parameter == "water units"
|
||||
|| parameter == "air units"
|
||||
|| parameter == "military units"
|
||||
|| parameter == "submarine units"
|
||||
// Note: this can't handle combinations of parameters (e.g. [{Military} {Water}])
|
||||
-> "unitType"
|
||||
Stats.isStats(parameter) -> "stats"
|
||||
parameter == "in this city"
|
||||
|| parameter == "in all cities"
|
||||
|| parameter == "in all coastal cities"
|
||||
|| parameter == "in capital"
|
||||
|| parameter == "in all non-occupied cities"
|
||||
|| parameter == "in all cities with a world wonder"
|
||||
|| parameter == "in all cities connected to capital"
|
||||
|| parameter == "in all cities with a garrison"
|
||||
|
Loading…
Reference in New Issue
Block a user