Merge pull request #11021 from VOREStation/Arokha/nifcraftmenus

Make nif/crafting menu buttons not be hidden
This commit is contained in:
Aronai Sieyes
2021-07-11 15:13:11 -04:00
committed by Chompstation Bot
parent 58f6f5a71a
commit d989caaf41
3 changed files with 10 additions and 2 deletions

View File

@@ -177,7 +177,10 @@ var/list/global_huds = list(
var/obj/screen/move_intent var/obj/screen/move_intent
var/list/adding var/list/adding
/// Misc hud elements that are hidden when the hud is minimized
var/list/other var/list/other
/// Same, but always shown even when the hud is minimized
var/list/other_important
var/list/miniobjs var/list/miniobjs
var/list/obj/screen/hotkeybuttons var/list/obj/screen/hotkeybuttons
@@ -214,6 +217,7 @@ var/list/global_huds = list(
move_intent = null move_intent = null
adding = null adding = null
other = null other = null
other_important = null
hotkeybuttons = null hotkeybuttons = null
// item_action_list = null // ? // item_action_list = null // ?
mymob = null mymob = null
@@ -367,12 +371,16 @@ var/list/global_huds = list(
client.screen -= hud_used.other client.screen -= hud_used.other
if(hud_used.hotkeybuttons) if(hud_used.hotkeybuttons)
client.screen -= hud_used.hotkeybuttons client.screen -= hud_used.hotkeybuttons
if(hud_used.other_important)
client.screen -= hud_used.other_important
else else
hud_used.hud_shown = 1 hud_used.hud_shown = 1
if(hud_used.adding) if(hud_used.adding)
client.screen += hud_used.adding client.screen += hud_used.adding
if(hud_used.other && hud_used.inventory_shown) if(hud_used.other && hud_used.inventory_shown)
client.screen += hud_used.other client.screen += hud_used.other
if(hud_used.other_important)
client.screen += hud_used.other_important
if(hud_used.hotkeybuttons && !hud_used.hotkey_ui_hidden) if(hud_used.hotkeybuttons && !hud_used.hotkey_ui_hidden)
client.screen += hud_used.hotkeybuttons client.screen += hud_used.hotkeybuttons
if(healths) if(healths)

View File

@@ -8,7 +8,7 @@
var/datum/hud/H = user.hud_used var/datum/hud/H = user.hud_used
var/obj/screen/craft/C = new() var/obj/screen/craft/C = new()
C.icon = H.ui_style C.icon = H.ui_style
H.other += C LAZYADD(H.other_important, C)
CL.screen += C CL.screen += C
RegisterSignal(C, COMSIG_CLICK, .proc/component_ui_interact) RegisterSignal(C, COMSIG_CLICK, .proc/component_ui_interact)

View File

@@ -55,7 +55,7 @@
screen_icon = new() screen_icon = new()
RegisterSignal(screen_icon, COMSIG_CLICK, .proc/nif_menu_click) RegisterSignal(screen_icon, COMSIG_CLICK, .proc/nif_menu_click)
screen_icon.icon = HUD.ui_style screen_icon.icon = HUD.ui_style
HUD.other += screen_icon LAZYADD(HUD.other_important, screen_icon)
user.client?.screen += screen_icon user.client?.screen += screen_icon
user.verbs |= /mob/living/carbon/human/proc/nif_menu user.verbs |= /mob/living/carbon/human/proc/nif_menu