mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2026-08-23 03:15:10 -06:00
fixing small things
This commit is contained in:
parent
d5f7f00a84
commit
5d21ec1660
4 changed files with 12 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<PartySlot?> = arrayOfNulls(MAX_SLOTS)
|
||||
|
||||
init {
|
||||
slots[LEADER_SLOT] = PartySlot(LEADER_SLOT, leader)
|
||||
wave = leader.getAttribute("barbass:wave", 1)
|
||||
}
|
||||
|
||||
fun slotOf(player: Player): Int =
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue