Add rig menu button to top left corner

This commit is contained in:
Aronai Sieyes
2021-07-12 19:06:46 -04:00
parent b285eae236
commit ab0a86c3f6
2 changed files with 24 additions and 16 deletions
+19 -16
View File
@@ -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 ? "<span class='warning'>offline</span>" : "<span class='notice'>online</span>"]."
. += "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 ? "<span class='warning'>offline</span>" : "<span class='notice'>online</span>"]."
. += "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))
@@ -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"