mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 16:38:22 +01:00
Strip Menu Additions (#8070)
Added an internals and suit sensors indicator to the strip menu. Toggle internals in the strip menu now displays whether you're toggling it on or off. Added an adjust mask and tank pressure check to the strip menu.
This commit is contained in:
@@ -311,16 +311,26 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/show_inv(mob/user as mob)
|
||||
if(user.incapacitated() || !user.Adjacent(src))
|
||||
if(user.incapacitated() || !user.Adjacent(src))
|
||||
return
|
||||
|
||||
var/obj/item/clothing/under/suit = null
|
||||
if (istype(w_uniform, /obj/item/clothing/under))
|
||||
if(istype(w_uniform, /obj/item/clothing/under))
|
||||
suit = w_uniform
|
||||
|
||||
user.set_machine(src)
|
||||
var/dat = "<B><HR><FONT size=3>[name]</FONT></B><BR><HR>"
|
||||
|
||||
if(internals)
|
||||
dat += "<B>Internals: [internal ? "On" : "Off"]</B><BR>"
|
||||
|
||||
if(suit)
|
||||
var/list/modes = list("Off" = 1, "Binary Sensors" = 2, "Vitals Tracker" = 3, "Tracking Beacon" = 4)
|
||||
dat += "<B>Suit Sensors: [modes[suit.sensor_mode + 1]]</B><BR>"
|
||||
|
||||
if(internals || suit)
|
||||
dat += "<HR>"
|
||||
|
||||
for(var/entry in species.hud.gear)
|
||||
var/list/slot_ref = species.hud.gear[entry]
|
||||
if((slot_ref["slot"] in list(slot_l_store, slot_r_store)))
|
||||
@@ -334,10 +344,22 @@
|
||||
dat += "<BR><b>Left hand:</b> <A href='?src=\ref[src];item=[slot_l_hand]'>[istype(l_hand) ? l_hand : "nothing"]</A>"
|
||||
dat += "<BR><b>Right hand:</b> <A href='?src=\ref[src];item=[slot_r_hand]'>[istype(r_hand) ? r_hand : "nothing"]</A>"
|
||||
|
||||
// Do they get an option to set internals?
|
||||
if(istype(wear_mask, /obj/item/clothing/mask) || istype(head, /obj/item/clothing/head/helmet/space))
|
||||
if(istype(back, /obj/item/tank) || istype(belt, /obj/item/tank) || istype(s_store, /obj/item/tank))
|
||||
dat += "<BR><A href='?src=\ref[src];item=internals'>Toggle internals.</A>"
|
||||
var/has_mask // 0, no mask | 1, mask but it's down | 2, mask and it's ready
|
||||
var/has_helmet
|
||||
if(istype(wear_mask, /obj/item/clothing/mask))
|
||||
var/obj/item/clothing/mask/M = wear_mask
|
||||
has_mask = 1
|
||||
if(!M.hanging)
|
||||
has_mask = 2
|
||||
if(istype(head, /obj/item/clothing/head/helmet/space))
|
||||
has_helmet = TRUE
|
||||
|
||||
var/has_tank
|
||||
if(istype(back, /obj/item/tank) || istype(belt, /obj/item/tank) || istype(s_store, /obj/item/tank))
|
||||
has_tank = TRUE
|
||||
|
||||
if((has_mask == 2|| has_helmet) && has_tank)
|
||||
dat += "<BR><A href='?src=\ref[src];item=internals'>Toggle internals [internal ? "off" : "on"]</A>"
|
||||
|
||||
// Other incidentals.
|
||||
if(istype(suit) && suit.has_sensor == 1)
|
||||
@@ -347,6 +369,12 @@
|
||||
if(legcuffed)
|
||||
dat += "<BR><A href='?src=\ref[src];item=[slot_legcuffed]'>Legcuffed</A>"
|
||||
|
||||
if(has_mask)
|
||||
var/obj/item/clothing/mask/M = wear_mask
|
||||
if(M.adjustable)
|
||||
dat += "<BR><A href='?src=\ref[src];item=mask'>Adjust mask</A>"
|
||||
if(has_tank && internal)
|
||||
dat += "<BR><A href='?src=\ref[src];item=tank'>Check air tank</A>"
|
||||
if(suit && LAZYLEN(suit.accessories))
|
||||
dat += "<BR><A href='?src=\ref[src];item=tie'>Remove accessory</A>"
|
||||
dat += "<BR><A href='?src=\ref[src];item=splints'>Remove splints</A>"
|
||||
@@ -1855,4 +1883,4 @@
|
||||
/mob/living/carbon/human/proc/gigashatter()
|
||||
for(var/obj/item/organ/external/E in organs)
|
||||
E.fracture()
|
||||
return
|
||||
return
|
||||
|
||||
@@ -1,16 +1,28 @@
|
||||
/mob/living/carbon/human/proc/handle_strip(var/slot_to_strip,var/mob/living/user)
|
||||
|
||||
/mob/living/carbon/human/proc/handle_strip(var/slot_to_strip, var/mob/living/user)
|
||||
if(!slot_to_strip || !istype(user) || ispAI(user) || (isanimal(user) && !istype(user, /mob/living/simple_animal/hostile) ) )
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(user.incapacitated() || !user.Adjacent(src))
|
||||
if(user.incapacitated() || !user.Adjacent(src))
|
||||
user << browse(null, text("window=mob[src.name]"))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
var/obj/item/target_slot = get_equipped_item(text2num(slot_to_strip))
|
||||
|
||||
switch(slot_to_strip)
|
||||
// Handle things that are part of this interface but not removing/replacing a given item.
|
||||
if("mask")
|
||||
visible_message(span("warning", "\The [user] is trying to adjust \the [src]'s mask!"))
|
||||
if(do_after(user,HUMAN_STRIP_DELAY, act_target = src))
|
||||
var/obj/item/clothing/mask/M = wear_mask
|
||||
M.adjust_mask(user, FALSE)
|
||||
return TRUE
|
||||
if("tank")
|
||||
visible_message(span("warning", "\The [user] is taking a look at \the [src]'s air tank."))
|
||||
if(do_after(user,HUMAN_STRIP_DELAY, act_target = src))
|
||||
var/obj/item/tank/T = internal
|
||||
to_chat(user, span("notice", "\The [T] has [T.air_contents.return_pressure()] kPA left."))
|
||||
to_chat(user, span("notice", "The [T] is set to release [T.distribute_pressure] kPA."))
|
||||
return TRUE
|
||||
if("pockets")
|
||||
visible_message("<span class='danger'>\The [user] is trying to empty \the [src]'s pockets!</span>")
|
||||
if(do_after(user,HUMAN_STRIP_DELAY, act_target = src))
|
||||
|
||||
Reference in New Issue
Block a user