mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 22:06:05 -04:00
Resolved #6527 - replacementTextForUniques activates for units when picking nations
This commit is contained in:
parent
0230575473
commit
6b99b11179
@ -248,8 +248,10 @@ class Nation : RulesetObject() {
|
|||||||
// This does not use the auto-linking FormattedLine(Unique) for two reasons:
|
// This does not use the auto-linking FormattedLine(Unique) for two reasons:
|
||||||
// would look a little chaotic as unit uniques unlike most uniques are a HashSet and thus do not preserve order
|
// would look a little chaotic as unit uniques unlike most uniques are a HashSet and thus do not preserve order
|
||||||
// No .copy() factory on FormattedLine and no FormattedLine(Unique, all other val's) constructor either
|
// No .copy() factory on FormattedLine and no FormattedLine(Unique, all other val's) constructor either
|
||||||
for (unique in unit.uniqueObjects.filterNot { it.text in originalUnit.uniques || it.hasFlag(UniqueFlag.HiddenToUsers) }) {
|
if (unit.replacementTextForUniques.isNotEmpty()){
|
||||||
|
yield(FormattedLine(unit.replacementTextForUniques))
|
||||||
|
}
|
||||||
|
else for (unique in unit.uniqueObjects.filterNot { it.text in originalUnit.uniques || it.hasFlag(UniqueFlag.HiddenToUsers) }) {
|
||||||
yield(FormattedLine(unique.text.tr(), indent = 1))
|
yield(FormattedLine(unique.text.tr(), indent = 1))
|
||||||
}
|
}
|
||||||
for (unique in originalUnit.uniqueObjects.filterNot { it.text in unit.uniques || it.hasFlag(UniqueFlag.HiddenToUsers) }) {
|
for (unique in originalUnit.uniqueObjects.filterNot { it.text in unit.uniques || it.hasFlag(UniqueFlag.HiddenToUsers) }) {
|
||||||
|
@ -40,7 +40,7 @@ class BaseUnit : RulesetObject(), INonPerpetualConstruction {
|
|||||||
|
|
||||||
override fun getUniqueTarget() = UniqueTarget.Unit
|
override fun getUniqueTarget() = UniqueTarget.Unit
|
||||||
|
|
||||||
private var replacementTextForUniques = ""
|
var replacementTextForUniques = ""
|
||||||
var promotions = HashSet<String>()
|
var promotions = HashSet<String>()
|
||||||
var obsoleteTech: String? = null
|
var obsoleteTech: String? = null
|
||||||
var upgradesTo: String? = null
|
var upgradesTo: String? = null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user