Skip to content

Commit bd4423c

Browse files
committed
fix hardsuit
1 parent ebb08bc commit bd4423c

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

modular_meta/features/hardsuits/code/hardsuit.dm

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,17 @@
5454
return
5555
helmet_on = FALSE
5656
if(ishuman(helmet.loc))
57+
if(!user && ishuman(helmet.loc))
58+
user = helmet.loc
59+
if(!user && ishuman(loc))
60+
user = loc
61+
if(!user)
62+
helmet.forceMove(src)
63+
return
5764
if(helmet.on)
5865
helmet.attack_self(user)
59-
user.transferItemToLoc(helmet, src, TRUE)
66+
if(!user.transferItemToLoc(helmet, src, TRUE))
67+
helmet.forceMove(src)
6068
user.update_worn_oversuit()
6169
to_chat(user, span_notice("The helmet on the hardsuit disengages."))
6270
playsound(src.loc, 'sound/vehicles/mecha/mechmove03.ogg', 50, TRUE)
@@ -122,11 +130,11 @@
122130
/obj/item/clothing/suit/space/hardsuit/equipped(mob/user, slot)
123131
..()
124132
if(helmet && slot != ITEM_SLOT_OCLOTHING)
125-
RemoveHelmet()
133+
RemoveHelmet(user)
126134

127135
/obj/item/clothing/suit/space/hardsuit/dropped(mob/user)
128136
..()
129-
RemoveHelmet()
137+
RemoveHelmet(user)
130138

131139
/obj/item/clothing/suit/space/hardsuit/item_action_slot_check(slot)
132140
if(slot == ITEM_SLOT_OCLOTHING) //we only give the mob the ability to toggle the helmet if he's wearing the hardsuit.

0 commit comments

Comments
 (0)