From c92855f9d1ca9d2147bc7001f8d48f7978df49db Mon Sep 17 00:00:00 2001 From: Robustin Date: Wed, 11 Apr 2018 06:07:54 -0400 Subject: [PATCH 1/2] Cult spell buttons will no longer hold an empty slot in the regular action bar (#36791) --- code/_onclick/hud/action_button.dm | 10 ++++++---- code/modules/antagonists/cult/blood_magic.dm | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/code/_onclick/hud/action_button.dm b/code/_onclick/hud/action_button.dm index 924adcd4c95f..bce8effc81bf 100644 --- a/code/_onclick/hud/action_button.dm +++ b/code/_onclick/hud/action_button.dm @@ -9,6 +9,7 @@ var/appearance_cache var/id + var/ordered = TRUE //If the button gets placed into the default bar /obj/screen/movable/action_button/Click(location,control,params) var/list/modifiers = params2list(params) @@ -149,13 +150,14 @@ client.screen += A.button else for(var/datum/action/A in actions) - button_number++ A.UpdateButtonIcon() var/obj/screen/movable/action_button/B = A.button - if(!B.moved) - B.screen_loc = hud_used.ButtonNumberToScreenCoords(button_number) - else + if(B.ordered) + button_number++ + if(B.moved) B.screen_loc = B.moved + else + B.screen_loc = hud_used.ButtonNumberToScreenCoords(button_number) if(reload_screen) client.screen += B diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm index 252d0e3d23a4..bb2ce1db2ad2 100644 --- a/code/modules/antagonists/cult/blood_magic.dm +++ b/code/modules/antagonists/cult/blood_magic.dm @@ -9,6 +9,7 @@ ..() button.screen_loc = "6:-29,4:-2" button.moved = "6:-29,4:-2" + button.ordered = FALSE /datum/action/innate/cult/blood_magic/Remove() for(var/X in spells) @@ -103,6 +104,7 @@ all_magic = BM ..() button.locked = TRUE + button.ordered = FALSE /datum/action/innate/cult/blood_spell/Remove() if(all_magic)