Boni -> Bonuses, this is English

This commit is contained in:
Yair Morgenstern 2024-01-14 10:02:55 +02:00
parent d69b458481
commit 6043a62353
3 changed files with 7 additions and 7 deletions

View File

@ -285,7 +285,7 @@ object SpecificUnitAutomation {
/**
* If there's a city nearby that can construct a wonder, walk there an get it built. Typically I
* like to build all wonders in the same city to have the boni accumulate (and it typically ends
* like to build all wonders in the same city to have the bonuses accumulate (and it typically ends
* up being my capital), but that would need too much logic (e.g. how far away is the capital,
* is the wonder likely still available by the time I'm there, is this particular wonder even
* buildable in the capital, etc.)

View File

@ -158,11 +158,11 @@ class Nation : RulesetObject() {
fun addBonusLines(header: String, uniqueMap: UniqueMap) {
// Note: Using getCityStateBonuses would be nice, but it's bound to a CityStateFunctions instance without even using `this`.
// Too convoluted to reuse that here - but feel free to refactor that into a static.
val boni = uniqueMap.getAllUniques().filterNot { it.isHiddenToUsers() }
if (boni.none()) return
val bonuses = uniqueMap.getAllUniques().filterNot { it.isHiddenToUsers() }
if (bonuses.none()) return
textList += FormattedLine()
textList += FormattedLine("{$header:} ")
for (unique in boni) {
for (unique in bonuses) {
textList += FormattedLine(unique, indent = 1)
if (unique.isOfType(UniqueType.CityStateUniqueLuxury)) showResources = true
}

View File

@ -177,11 +177,11 @@ class CityStateDiplomacyTable(private val diplomacyScreen: DiplomacyScreen) {
}
fun getBonusText(header: String, level: RelationshipLevel): String {
val boni = viewingCiv.cityStateFunctions
val bonuses = viewingCiv.cityStateFunctions
.getCityStateBonuses(otherCiv.cityStateType, level)
.filterNot { it.isHiddenToUsers() }
if (boni.none()) return ""
return (sequenceOf(header) + boni.map { it.text }).joinToString(separator = "\n") { it.tr() }
if (bonuses.none()) return ""
return (sequenceOf(header) + bonuses.map { it.text }).joinToString(separator = "\n") { it.tr() }
}
fun addBonusLabel(header: String, bonusLevel: RelationshipLevel, relationLevel: RelationshipLevel) {
val bonusLabelColor = if (relationLevel == bonusLevel) Color.GREEN else Color.GRAY