mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
Proc to define
This commit is contained in:
@@ -230,3 +230,6 @@ GLOBAL_LIST_INIT(security_wintercoat_allowed, typecacheof(list(
|
||||
/obj/item/tank/internals/emergency_oxygen,
|
||||
/obj/item/tank/internals/plasmaman,
|
||||
/obj/item/toy)))
|
||||
|
||||
//Internals checker
|
||||
#define GET_INTERNAL_SLOTS(C) list(C.head, C.wear_mask)
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
var/obj/item/clothing/check
|
||||
var/internals = FALSE
|
||||
|
||||
for(check in C.get_internal_slots())
|
||||
for(check in GET_INTERNAL_SLOTS(C))
|
||||
if(istype(check, /obj/item/clothing/mask))
|
||||
var/obj/item/clothing/mask/M = check
|
||||
if(M.mask_adjusted)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
var/obj/item/clothing/check
|
||||
var/internals = FALSE
|
||||
|
||||
for(check in H.get_internal_slots())
|
||||
for(check in GET_INTERNAL_SLOTS(H))
|
||||
if(istype(check, /obj/item/clothing/mask))
|
||||
var/obj/item/clothing/mask/M = check
|
||||
if(M.mask_adjusted)
|
||||
|
||||
@@ -140,9 +140,3 @@
|
||||
/mob/living/carbon/proc/get_holding_bodypart_of_item(obj/item/I)
|
||||
var/index = get_held_index_of_item(I)
|
||||
return index && hand_bodyparts[index]
|
||||
|
||||
/mob/living/carbon/proc/get_internal_slots()
|
||||
return list(
|
||||
head,
|
||||
wear_mask,
|
||||
)
|
||||
|
||||
@@ -306,12 +306,8 @@
|
||||
/mob/living/carbon/proc/get_breath_from_internal(volume_needed)
|
||||
var/obj/item/clothing/check
|
||||
var/internals = FALSE
|
||||
var/internalslots = list(
|
||||
head,
|
||||
wear_mask,
|
||||
)
|
||||
|
||||
for(check in internalslots)
|
||||
for(check in GET_INTERNAL_SLOTS(src))
|
||||
if(CHECK_BITFIELD(check.clothing_flags, ALLOWINTERNALS))
|
||||
internals = TRUE
|
||||
if(internal)
|
||||
|
||||
Reference in New Issue
Block a user