From ab0a86c3f6e984da1a5e7f4be76cce7782b7eb35 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Mon, 12 Jul 2021 01:32:01 -0400 Subject: [PATCH] Add rig menu button to top left corner --- code/modules/clothing/spacesuits/rig/rig.dm | 35 ++++++++++--------- .../clothing/spacesuits/rig/rig_verbs.dm | 5 +++ 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 19e481b67da..cc7084341f2 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -97,22 +97,8 @@ var/datum/effect/effect/system/spark_spread/spark_system var/datum/mini_hud/rig/minihud -/obj/item/weapon/rig/examine() - . = ..() - if(wearer) - for(var/obj/item/piece in list(helmet,gloves,chest,boots)) - if(!piece || piece.loc != wearer) - continue - . += "[bicon(piece)] \The [piece] [piece.gender == PLURAL ? "are" : "is"] deployed." - - if(src.loc == usr) - . += "The access panel is [locked? "locked" : "unlocked"]." - . += "The maintenance panel is [open ? "open" : "closed"]." - . += "Hardsuit systems are [offline ? "offline" : "online"]." - . += "The cooling stystem is [cooling_on ? "active" : "inactive"]." - - if(open) - . += "It's equipped with [english_list(installed_modules)]." + // Action button + action_button_name = "Hardsuit Interface" /obj/item/weapon/rig/New() ..() @@ -185,6 +171,23 @@ spark_system = null return ..() +/obj/item/weapon/rig/examine() + . = ..() + if(wearer) + for(var/obj/item/piece in list(helmet,gloves,chest,boots)) + if(!piece || piece.loc != wearer) + continue + . += "[bicon(piece)] \The [piece] [piece.gender == PLURAL ? "are" : "is"] deployed." + + if(src.loc == usr) + . += "The access panel is [locked? "locked" : "unlocked"]." + . += "The maintenance panel is [open ? "open" : "closed"]." + . += "Hardsuit systems are [offline ? "offline" : "online"]." + . += "The cooling stystem is [cooling_on ? "active" : "inactive"]." + + if(open) + . += "It's equipped with [english_list(installed_modules)]." + // We only care about processing when we're on a mob /obj/item/weapon/rig/Moved(old_loc, direction, forced) if(ismob(loc)) diff --git a/code/modules/clothing/spacesuits/rig/rig_verbs.dm b/code/modules/clothing/spacesuits/rig/rig_verbs.dm index c1d2fe2c5be..b28d93bc554 100644 --- a/code/modules/clothing/spacesuits/rig/rig_verbs.dm +++ b/code/modules/clothing/spacesuits/rig/rig_verbs.dm @@ -9,6 +9,11 @@ if(wearer && (wearer.back == src || wearer.belt == src)) tgui_interact(usr) +// So the UI button clicks come here +/obj/item/weapon/rig/ui_action_click() + if(usr == wearer && (wearer.back == src || wearer.belt == src)) + tgui_interact(usr) + /obj/item/weapon/rig/verb/toggle_vision() set name = "Toggle Visor"