From 5d21ec1660177bf20e38fc6a04eda0445c2acb8a Mon Sep 17 00:00:00 2001 From: Tooze Date: Fri, 30 Jan 2026 19:34:28 -0500 Subject: [PATCH] fixing small things --- .../content/minigame/barbassault/arena/BaHornSystem.kt | 8 ++++---- .../minigame/barbassault/arena/BarbassaultSession.kt | 7 ++++++- .../main/content/minigame/barbassault/lobby/BarbTeam.kt | 3 ++- .../minigame/barbassault/lobby/RoleSelectInterface.kt | 3 --- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Server/src/main/content/minigame/barbassault/arena/BaHornSystem.kt b/Server/src/main/content/minigame/barbassault/arena/BaHornSystem.kt index 930983898..1edaa3e76 100644 --- a/Server/src/main/content/minigame/barbassault/arena/BaHornSystem.kt +++ b/Server/src/main/content/minigame/barbassault/arena/BaHornSystem.kt @@ -64,10 +64,10 @@ class BaHornSystem : InteractionListener { if (optionClicked == "drop") { sendMessage(player, "I need that!"); return@on false } val styleCallMap = mapOf( - "tell-style1" to (BarbassaultSession.AttackerStyle.STYLE_1 to BaCall.ATTACKER_STYLE_1), - "tell-style2" to (BarbassaultSession.AttackerStyle.STYLE_2 to BaCall.ATTACKER_STYLE_2), - "tell-style3" to (BarbassaultSession.AttackerStyle.STYLE_3 to BaCall.ATTACKER_STYLE_3), - "tell-style4" to (BarbassaultSession.AttackerStyle.STYLE_4 to BaCall.ATTACKER_STYLE_4), + "tell-style1" to (BarbassaultSession.AttackerStyle.Style_1 to BaCall.ATTACKER_STYLE_1), + "tell-style2" to (BarbassaultSession.AttackerStyle.Style_2 to BaCall.ATTACKER_STYLE_2), + "tell-style3" to (BarbassaultSession.AttackerStyle.Style_3 to BaCall.ATTACKER_STYLE_3), + "tell-style4" to (BarbassaultSession.AttackerStyle.Style_4 to BaCall.ATTACKER_STYLE_4), "medic" to (null to BaCall.MEDIC) ) val pair = styleCallMap[optionClicked] ?: return@on false diff --git a/Server/src/main/content/minigame/barbassault/arena/BarbassaultSession.kt b/Server/src/main/content/minigame/barbassault/arena/BarbassaultSession.kt index 23ac4462c..36ff7712d 100644 --- a/Server/src/main/content/minigame/barbassault/arena/BarbassaultSession.kt +++ b/Server/src/main/content/minigame/barbassault/arena/BarbassaultSession.kt @@ -59,7 +59,6 @@ class BarbassaultSession( val activity: BarbassaultActivity ? = null) : MapArea fun beginStartingPhase() { if (state != BarbassaultState.PARTY_CREATION) return - state = BarbassaultState.STARTING createArena() startCountdown() @@ -245,23 +244,29 @@ class BarbassaultSession( val activity: BarbassaultActivity ? = null) : MapArea fun updateRoleUI() { team.allPlayers().forEach { player -> + val wave = team.wave.toString() val role = team.getRoleForPlayer(player) ?: return@forEach val call = roleCalls[role] ?: return@forEach when (role) { BarbRole.ATTACKER -> { + //make sure wave is using wring childid. + setInterfaceText(player, "Wave $wave" , Components.BARBASSAULT_OVER_ATT_485, 1) updateAttackerUI(player, call as AttackerCall) setInterfaceText(player, call.crossRoleDisplay(), Components.BARBASSAULT_OVER_ATT_485, 7) } BarbRole.COLLECTOR -> { + setInterfaceText(player, "Wave $wave" , Components.BARBASSAULT_OVER_ATT_485, 1) updateOtherRoleUI(player, call, Components.BARBASSAULT_OVER_COL_486, 4) setInterfaceText(player, call.crossRoleDisplay(), Components.BARBASSAULT_OVER_COL_486, 6) } BarbRole.DEFENDER -> { + setInterfaceText(player, "Wave $wave" , Components.BARBASSAULT_OVER_ATT_485, 1) updateOtherRoleUI(player, call, Components.BARBASSAULT_OVER_DEF_487, 3) setInterfaceText(player, call.crossRoleDisplay(), Components.BARBASSAULT_OVER_DEF_487, 5) } BarbRole.HEALER -> { + setInterfaceText(player, "Wave $wave" , Components.BARBASSAULT_OVER_ATT_485, 1) updateOtherRoleUI(player, call, Components.BARBASSAULT_OVER_HEAL_488, 31) setInterfaceText(player, call.crossRoleDisplay(), Components.BARBASSAULT_OVER_HEAL_488, 33) } diff --git a/Server/src/main/content/minigame/barbassault/lobby/BarbTeam.kt b/Server/src/main/content/minigame/barbassault/lobby/BarbTeam.kt index 7b215bfbb..eec927186 100644 --- a/Server/src/main/content/minigame/barbassault/lobby/BarbTeam.kt +++ b/Server/src/main/content/minigame/barbassault/lobby/BarbTeam.kt @@ -55,12 +55,13 @@ class BarbTeam(val session: BarbassaultSession, leader: Player) { const val MAX_SLOTS = 5 const val LEADER_SLOT = 0 } - + var wave = 1 var recruit: PendingRecruit? = null private val slots: Array = arrayOfNulls(MAX_SLOTS) init { slots[LEADER_SLOT] = PartySlot(LEADER_SLOT, leader) + wave = leader.getAttribute("barbass:wave", 1) } fun slotOf(player: Player): Int = diff --git a/Server/src/main/content/minigame/barbassault/lobby/RoleSelectInterface.kt b/Server/src/main/content/minigame/barbassault/lobby/RoleSelectInterface.kt index 034ad8cf5..4956a4a5c 100644 --- a/Server/src/main/content/minigame/barbassault/lobby/RoleSelectInterface.kt +++ b/Server/src/main/content/minigame/barbassault/lobby/RoleSelectInterface.kt @@ -124,9 +124,6 @@ private fun handleDecline(player: Player) { val leader = player.baSession?.team?.getLeader()?.player sendMessage(leader!!, "The applicant declined your offer.") closeInterface(player) - - - }