mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 04:57:57 +01:00
Merge pull request #11353 from Aranclanos/hardsuithelmet
Hardsuit helmets will now store the suit as a var and they will qdel …
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
var/basestate = "hardsuit"
|
||||
var/brightness_on = 4 //luminosity when on
|
||||
var/on = 0
|
||||
var/obj/item/clothing/suit/space/hardsuit/suit
|
||||
item_color = "engineering" //Determines used sprites: hardsuit[on]-[color] and hardsuit[on]-[color]2 (lying down sprite)
|
||||
action_button_name = "Toggle Helmet Light"
|
||||
flags = BLOCKHAIR | STOPSPRESSUREDMAGE | THICKMATERIAL | NODROP
|
||||
|
||||
@@ -90,7 +90,6 @@
|
||||
user << "Alt-click on [src] to toggle the [togglename]."
|
||||
|
||||
//Hardsuit toggle code
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/New()
|
||||
MakeHelmet()
|
||||
if(!jetpack)
|
||||
@@ -98,15 +97,24 @@
|
||||
verbs -= /obj/item/clothing/suit/space/hardsuit/verb/Jetpack_Rockets
|
||||
..()
|
||||
/obj/item/clothing/suit/space/hardsuit/Destroy()
|
||||
qdel(helmet)
|
||||
if(helmet)
|
||||
helmet.suit = null
|
||||
qdel(helmet)
|
||||
qdel(jetpack)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/Destroy()
|
||||
if(suit)
|
||||
suit.helmet = null
|
||||
qdel(suit)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/proc/MakeHelmet()
|
||||
if(!helmettype)
|
||||
return
|
||||
if(!helmet)
|
||||
var/obj/item/clothing/head/helmet/space/hardsuit/W = new helmettype(src)
|
||||
W.suit = src
|
||||
helmet = W
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/ui_action_click()
|
||||
@@ -121,7 +129,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/proc/RemoveHelmet()
|
||||
if(!helmettype)
|
||||
if(!helmet)
|
||||
return
|
||||
suittoggled = 0
|
||||
if(ishuman(helmet.loc))
|
||||
|
||||
Reference in New Issue
Block a user