diff --git a/core/src/com/unciv/ui/screens/devconsole/CliInput.kt b/core/src/com/unciv/ui/screens/devconsole/CliInput.kt index c065ce225a1f4..fad23a384bb1c 100644 --- a/core/src/com/unciv/ui/screens/devconsole/CliInput.kt +++ b/core/src/com/unciv/ui/screens/devconsole/CliInput.kt @@ -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 } diff --git a/core/src/com/unciv/ui/screens/devconsole/ConsoleUnitCommands.kt b/core/src/com/unciv/ui/screens/devconsole/ConsoleUnitCommands.kt index 1b17fc9b642ae..f3b8f98769875 100644 --- a/core/src/com/unciv/ui/screens/devconsole/ConsoleUnitCommands.kt +++ b/core/src/com/unciv/ui/screens/devconsole/ConsoleUnitCommands.kt @@ -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) }