mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 20:47:10 +01:00
remove that button!
This commit is contained in:
@@ -36,8 +36,6 @@
|
||||
var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
|
||||
var/action_buttons_hidden = 0
|
||||
|
||||
var/obj/screen/internals
|
||||
|
||||
/mob/proc/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud(src)
|
||||
@@ -81,7 +79,6 @@
|
||||
alien_plasma_display = null
|
||||
vampire_blood_display = null
|
||||
nightvisionicon = null
|
||||
internals = null
|
||||
|
||||
mymob = null
|
||||
return ..()
|
||||
|
||||
@@ -319,9 +319,6 @@
|
||||
mymob.throw_icon.alpha = ui_alpha
|
||||
hotkeybuttons += mymob.throw_icon
|
||||
|
||||
internals = new /obj/screen/internals()
|
||||
infodisplay += internals
|
||||
|
||||
mymob.healths = new /obj/screen/healths()
|
||||
infodisplay += mymob.healths
|
||||
|
||||
|
||||
@@ -102,9 +102,6 @@
|
||||
mymob.throw_icon.alpha = ui_alpha
|
||||
hotkeybuttons += mymob.throw_icon
|
||||
|
||||
internals = new /obj/screen/internals()
|
||||
infodisplay += internals
|
||||
|
||||
mymob.healths = new /obj/screen/healths()
|
||||
infodisplay += mymob.healths
|
||||
|
||||
|
||||
@@ -90,107 +90,6 @@
|
||||
icon = 'icons/mob/screen_robot.dmi'
|
||||
screen_loc = ui_borg_intents
|
||||
|
||||
/obj/screen/internals
|
||||
name = "toggle internals"
|
||||
icon_state = "internal0"
|
||||
screen_loc = ui_internal
|
||||
|
||||
/obj/screen/internals/Click()
|
||||
if(!iscarbon(usr))
|
||||
return
|
||||
var/mob/living/carbon/C = usr
|
||||
if(C.incapacitated())
|
||||
return
|
||||
|
||||
if(C.internal)
|
||||
C.internal = null
|
||||
to_chat(C, "<span class='notice'>No longer running on internals.</span>")
|
||||
icon_state = "internal0"
|
||||
else
|
||||
var/no_mask = FALSE
|
||||
if(!C.get_organ_slot("breathing_tube"))
|
||||
if(!C.wear_mask || !(C.wear_mask.flags & AIRTIGHT))
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(!H.head || !(H.head.flags & AIRTIGHT))
|
||||
no_mask = TRUE
|
||||
|
||||
if(no_mask)
|
||||
to_chat(C, "<span class='notice'>You are not wearing a suitable mask or helmet.</span>")
|
||||
return
|
||||
|
||||
var/list/nicename = null
|
||||
var/list/tankcheck = null
|
||||
var/breathes = "oxygen"
|
||||
var/list/contents = list()
|
||||
var/from = "on"
|
||||
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
breathes = H.species.breathid
|
||||
nicename = list("suit", "back", "belt", "right hand", "left hand", "left pocket", "right pocket")
|
||||
tankcheck = list(H.s_store, C.back, H.belt, C.r_hand, C.l_hand, H.l_store, H.r_store)
|
||||
else
|
||||
nicename = list("right hand", "left hand", "back")
|
||||
tankcheck = list(C.r_hand, C.l_hand, C.back)
|
||||
|
||||
// Rigs are a fucking pain since they keep an air tank in nullspace.
|
||||
if(istype(C.back,/obj/item/weapon/rig))
|
||||
var/obj/item/weapon/rig/rig = C.back
|
||||
if(rig.air_supply)
|
||||
from = "in"
|
||||
nicename |= "hardsuit"
|
||||
tankcheck |= rig.air_supply
|
||||
|
||||
for(var/i = 1, i < tankcheck.len + 1, ++i)
|
||||
if(istype(tankcheck[i], /obj/item/weapon/tank))
|
||||
var/obj/item/weapon/tank/t = tankcheck[i]
|
||||
switch(breathes)
|
||||
if("n2")
|
||||
if(t.air_contents.nitrogen && !t.air_contents.oxygen)
|
||||
contents.Add(t.air_contents.nitrogen)
|
||||
else
|
||||
contents.Add(0)
|
||||
if("o2")
|
||||
if(t.air_contents.oxygen && !t.air_contents.toxins)
|
||||
contents.Add(t.air_contents.oxygen)
|
||||
else
|
||||
contents.Add(0)
|
||||
if("co2")
|
||||
if(t.air_contents.carbon_dioxide && !t.air_contents.toxins)
|
||||
contents.Add(t.air_contents.carbon_dioxide)
|
||||
else
|
||||
contents.Add(0)
|
||||
if("toxin")
|
||||
if(t.air_contents.toxins)
|
||||
contents.Add(t.air_contents.toxins)
|
||||
else
|
||||
contents.Add(0)
|
||||
else
|
||||
//no tank so we set contents to 0
|
||||
contents.Add(0)
|
||||
|
||||
//Alright now we know the contents of the tanks so we have to pick the best one.
|
||||
var/best = 0
|
||||
var/bestcontents = 0
|
||||
for(var/i=1, i < contents.len + 1 , ++i)
|
||||
if(!contents[i])
|
||||
continue
|
||||
if(contents[i] > bestcontents)
|
||||
best = i
|
||||
bestcontents = contents[i]
|
||||
//We've determined the best container now we set it as our internals
|
||||
if(best)
|
||||
to_chat(C, "<span class='notice'>You are now running on internals from [tankcheck[best]] [from] your [nicename[best]].</span>")
|
||||
C.internal = tankcheck[best]
|
||||
|
||||
if(C.internal)
|
||||
icon_state = "internal1"
|
||||
else
|
||||
to_chat(C, "<span class='notice'>You don't have a[breathes == "oxygen" ? "n oxygen" : addtext(" ",breathes)] tank.</span>")
|
||||
|
||||
C.update_action_buttons_icon()
|
||||
|
||||
/obj/screen/mov_intent
|
||||
name = "run/walk toggle"
|
||||
icon_state = "running"
|
||||
|
||||
Reference in New Issue
Block a user