Added 'City-State' as value for nationFilter

This commit is contained in:
yairm210
2024-10-10 22:57:19 +03:00
parent e4ed06abd0
commit feae93b799
3 changed files with 4 additions and 4 deletions

View File

@ -267,8 +267,7 @@ class Nation : RulesetObject() {
in Constants.all -> true
name -> true
"Major" -> isMajorCiv
// "CityState" to be deprecated, replaced by "City-States"
"CityState", Constants.cityStates -> isCityState
Constants.cityStates, "City-State" -> isCityState
else -> uniques.contains(filter)
}
}

View File

@ -230,7 +230,7 @@ enum class UniqueParameterType(
/** Implemented by [Nation.matchesFilter][com.unciv.models.ruleset.nation.Nation.matchesFilter] */
NationFilter("nationFilter", Constants.cityStates) {
override val staticKnownValues = setOf(Constants.cityStates, "Major") + Constants.all
override val staticKnownValues = setOf(Constants.cityStates, "City-State", "Major") + Constants.all
override fun getErrorSeverity(parameterText: String, ruleset: Ruleset) = getErrorSeverityForFilter(parameterText, ruleset)

View File

@ -47,7 +47,7 @@ Allows filtering for specific nations. Used by [ModOptions.nationsToRemove](Mod-
Allowed values:
- `All`
- `City-states`
- `City-States`, `City-State`
- `Major`
- Nation name
- A unique a Nation has (verbatim, no placeholders)
@ -309,6 +309,7 @@ Allowed values:
- `year`, `turns`
- `Cities`, `[cityFilter] Cities`
- `City-States` - counts all undefeated city-states
- `Units`, `[mapUnitFilter] Units`
- `[buildingFilter] Buildings`
- Stat name - gets the stat *reserve*, not the amount per turn (can be city stats or civilization stats, depending on where the unique is used)