From c9de1b6534aaf89c3fb38ddfb89bb690fdbcdab6 Mon Sep 17 00:00:00 2001 From: phinner <62483793+phinner@users.noreply.github.com> Date: Sun, 3 Dec 2023 00:39:34 +0100 Subject: [PATCH] fix: Make sure user settings are ordered --- .../xpdustry/imperium/mindustry/account/UserSettingsCommand.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imperium-mindustry/src/main/kotlin/com/xpdustry/imperium/mindustry/account/UserSettingsCommand.kt b/imperium-mindustry/src/main/kotlin/com/xpdustry/imperium/mindustry/account/UserSettingsCommand.kt index 92e6492d..53d39826 100644 --- a/imperium-mindustry/src/main/kotlin/com/xpdustry/imperium/mindustry/account/UserSettingsCommand.kt +++ b/imperium-mindustry/src/main/kotlin/com/xpdustry/imperium/mindustry/account/UserSettingsCommand.kt @@ -54,7 +54,7 @@ class UserSettingsCommand(instances: InstanceManager) : ImperiumApplication.List playerSettingsInterface.addTransformer { view, pane -> pane.title = "Player Settings" pane.content = "Change your settings by clicking on the corresponding buttons." - for ((setting, value) in view.state[SETTINGS]!!) { + for ((setting, value) in view.state[SETTINGS]!!.entries.sortedBy { it.key.name }) { val text = buildString { append(setting.name.lowercase().replace("_", "-")) append(": ")