mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 22:00:24 +07:00
Changed stockpile names to be human readable
This commit is contained in:
@ -478,7 +478,7 @@ enum class UniqueParameterType(
|
||||
Stockpile("stockpile", "Mana", "The name of any stockpiled resource") {
|
||||
override fun getKnownValuesForAutocomplete(ruleset: Ruleset): Set<String> {
|
||||
return ruleset.tileResources.filter { it.value.isStockpiled }.keys +
|
||||
Stat.entries.map { it.name } + SubStat.StoredFood.name + SubStat.GoldenAgePoints.name
|
||||
Stat.entries.map { it.name } + SubStat.StoredFood.text + SubStat.GoldenAgePoints.text
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -2,21 +2,14 @@ package com.unciv.models.stats
|
||||
|
||||
import com.unciv.logic.civilization.NotificationIcon
|
||||
|
||||
enum class SubStat(val icon: String) : GameResource {
|
||||
GoldenAgePoints(NotificationIcon.Happiness),
|
||||
TotalCulture(NotificationIcon.Culture),
|
||||
StoredFood(NotificationIcon.Food),
|
||||
enum class SubStat(val text: String, val icon: String) : GameResource {
|
||||
GoldenAgePoints("Golde Age points", NotificationIcon.Happiness),
|
||||
TotalCulture("Total Culture", NotificationIcon.Culture),
|
||||
StoredFood("Stored Food", NotificationIcon.Food),
|
||||
;
|
||||
companion object {
|
||||
val useableToBuy = setOf(GoldenAgePoints, StoredFood)
|
||||
val civWideSubStats = setOf(GoldenAgePoints, TotalCulture)
|
||||
fun safeValueOf(name: String): SubStat? {
|
||||
return when (name) {
|
||||
GoldenAgePoints.name -> GoldenAgePoints
|
||||
TotalCulture.name -> TotalCulture
|
||||
StoredFood.name -> StoredFood
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
fun safeValueOf(name: String): SubStat? = entries.firstOrNull { it.text == name }
|
||||
}
|
||||
}
|
||||
|
@ -235,6 +235,17 @@ don't have enough left in stock.
|
||||
To use, you need to first define a TileResources with the "Stockpiled" Unique. Then you can reference
|
||||
them in other Uniques.
|
||||
|
||||
## Stockpile
|
||||
|
||||
Something that can be added to a civ
|
||||
|
||||
Allowed values:
|
||||
|
||||
- stockpiled resource (see above)
|
||||
- Stat name - for global stats, not city stats
|
||||
- `Stored Food` (for cities)
|
||||
- `Golden Age points`
|
||||
|
||||
## technologyFilter
|
||||
|
||||
At the moment only implemented for [ModOptions.techsToRemove](Mod-file-structure/5-Miscellaneous-JSON-files.md#modoptionsjson).
|
||||
|
Reference in New Issue
Block a user