From d90e782f044278a8155e42ed1f0eae00a7ef745b Mon Sep 17 00:00:00 2001 From: Niklas Date: Sun, 25 Aug 2024 22:17:46 +0200 Subject: [PATCH] re-add game lobbies --- gradle.properties | 2 +- .../kotlin/de/derniklaas/buildbugs/utils/ServerState.kt | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index d0877bf..3637549 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ yarn_mappings=1.21+build.9 loader_version=0.15.11 fabric_kotlin_version=1.11.0+kotlin.2.0.0 fabric_api_version=0.100.7+1.21 -mod_version=1.12.0 +mod_version=1.12.1 noxesium_version=2.1.0 adventure_version=5.14.0 cloud_version=2.0.0-beta.7 diff --git a/src/main/kotlin/de/derniklaas/buildbugs/utils/ServerState.kt b/src/main/kotlin/de/derniklaas/buildbugs/utils/ServerState.kt index 5ed62a0..e2249d1 100644 --- a/src/main/kotlin/de/derniklaas/buildbugs/utils/ServerState.kt +++ b/src/main/kotlin/de/derniklaas/buildbugs/utils/ServerState.kt @@ -23,7 +23,11 @@ data class ServerState( * If it's not known, it will return the [type] and [subType] */ fun getFancyName(type: String = this.serverType): String = when (type) { - Constants.LOBBY -> "Lobby" + Constants.LOBBY -> { + if (subType == "main") "Main Lobby" + else if (type == subType) "Lobby Lobby?" + else "${getFancyName(subType)} Lobby" + } // Game modes Constants.PARKOUR_WARRIOR -> "Parkour Warrior" @@ -34,7 +38,7 @@ data class ServerState( Constants.DYNABALL -> "Dynaball" Constants.ROCKET_SPLEEF_RUSH -> "Rocket Spleef" - // Event gametypes + // Event game types Constants.HUB -> "Hub" Constants.ACE_RACE -> "Ace Race" Constants.PARKOUR_TAG -> "Parkour Tag"