Hardsuit Helmets can now be used as internals masks. Rejoice, CE mains.

Also reworks internals code a little to be much more friendly. Any head or mask item with the flag should now function as an internals mask if it has the ALLOWSINTERNALS flag.
This commit is contained in:
Chayse Ramsay
2019-07-28 17:31:59 +01:00
parent 39dea966ae
commit 5055cd73b9
14 changed files with 62 additions and 37 deletions
+13 -7
View File
@@ -33,13 +33,19 @@
H.update_internals_hud_icon(0)
else
if(!H.getorganslot(ORGAN_SLOT_BREATHING_TUBE))
if(!H.wear_mask)
to_chat(H, "<span class='warning'>You need a mask!</span>")
return
if(H.wear_mask.mask_adjusted)
H.wear_mask.adjustmask(H)
if(!(H.wear_mask.clothing_flags & MASKINTERNALS))
to_chat(H, "<span class='warning'>[H.wear_mask] can't use [src]!</span>")
var/obj/item/clothing/check
var/internals = FALSE
for(check in H.get_internal_slots())
if(istype(check, /obj/item/clothing/mask))
var/obj/item/clothing/mask/M = check
if(M.mask_adjusted)
M.adjustmask(H)
if(CHECK_BITFIELD(check.clothing_flags, ALLOWINTERNALS))
internals = TRUE
if(!internals)
to_chat(H, "<span class='warning'>You are not wearing an internals mask!</span>")
return
if(H.internal)