mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-09 23:39:40 +07:00
square-bracket-containing promotions are addable via visible name in dev console
This commit is contained in:
@ -76,7 +76,7 @@ internal class CliInput(
|
||||
override fun equals(other: Any?): Boolean = when {
|
||||
this === other -> true
|
||||
other is CliInput -> compareTo(other) == 0
|
||||
other is String -> compareTo(other, method) == 0
|
||||
other is String -> compareTo(other.replace("[","").replace("]",""), method) == 0
|
||||
else -> false
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,7 @@ internal class ConsoleUnitCommands : ConsoleCommandNode {
|
||||
val promotions = console.getSelectedUnit().promotions.promotions
|
||||
val options = console.gameInfo.ruleset.unitPromotions.keys.asSequence()
|
||||
.filter { it !in promotions }
|
||||
.map { it.replace("[","").replace("]","") }
|
||||
.asIterable()
|
||||
return getAutocompleteString(params.lastOrNull().orEmpty(), options, console)
|
||||
}
|
||||
|
Reference in New Issue
Block a user