From 5055cd73b91f143899b313e11e755701eec93121 Mon Sep 17 00:00:00 2001 From: Chayse Ramsay Date: Sun, 28 Jul 2019 17:31:59 +0100 Subject: [PATCH 1/6] 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. --- code/__DEFINES/obj_flags.dm | 2 +- code/_globalvars/bitfields.dm | 2 +- code/_onclick/hud/screen_objects.dm | 23 +++++++++++-------- code/game/objects/items/tanks/tanks.dm | 20 ++++++++++------ code/modules/clothing/chameleon.dm | 2 +- code/modules/clothing/masks/breath.dm | 4 ++-- code/modules/clothing/masks/gasmask.dm | 14 +++++------ code/modules/clothing/masks/hailer.dm | 4 ++-- .../clothing/spacesuits/_spacesuits.dm | 2 +- .../modules/mining/equipment/explorer_gear.dm | 2 +- .../living/carbon/alien/special/facehugger.dm | 2 +- code/modules/mob/living/carbon/carbon.dm | 4 ++-- .../mob/living/carbon/human/inventory.dm | 6 +++++ code/modules/mob/living/carbon/life.dm | 12 +++++++++- 14 files changed, 62 insertions(+), 37 deletions(-) diff --git a/code/__DEFINES/obj_flags.dm b/code/__DEFINES/obj_flags.dm index 5c21fbbc71..01d95d7ff9 100644 --- a/code/__DEFINES/obj_flags.dm +++ b/code/__DEFINES/obj_flags.dm @@ -33,7 +33,7 @@ #define LAVAPROTECT (1<<0) #define STOPSPRESSUREDAMAGE (1<<1) //SUIT and HEAD items which stop pressure damage. To stop you taking all pressure damage you must have both a suit and head item with this flag. #define BLOCK_GAS_SMOKE_EFFECT (1<<2) // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! -#define MASKINTERNALS (1<<3) // mask allows internals +#define ALLOWINTERNALS (1<<3) // mask allows internals #define NOSLIP (1<<4) //prevents from slipping on wet floors, in space etc #define THICKMATERIAL (1<<5) //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. #define VOICEBOX_TOGGLABLE (1<<6) // The voicebox in this clothing can be toggled. diff --git a/code/_globalvars/bitfields.dm b/code/_globalvars/bitfields.dm index bb9fc98b8e..3b32745b5c 100644 --- a/code/_globalvars/bitfields.dm +++ b/code/_globalvars/bitfields.dm @@ -136,7 +136,7 @@ GLOBAL_LIST_INIT(bitfields, list( "LAVAPROTECT" = LAVAPROTECT, "STOPSPRESSUREDAMAGE" = STOPSPRESSUREDAMAGE, "BLOCK_GAS_SMOKE_EFFECT" = BLOCK_GAS_SMOKE_EFFECT, - "MASKINTERNALS" = MASKINTERNALS, + "ALLOWINTERNALS" = ALLOWINTERNALS, "NOSLIP" = NOSLIP, "THICKMATERIAL" = THICKMATERIAL, "VOICEBOX_TOGGLABLE" = VOICEBOX_TOGGLABLE, diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 5ee4ae0f8a..caa8d23df4 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -280,7 +280,7 @@ /obj/screen/internals/Click() if(!iscarbon(usr)) return - var/mob/living/carbon/C = usr + var/mob/living/carbon/human/C = usr if(C.incapacitated()) return @@ -290,16 +290,19 @@ icon_state = "internal0" else if(!C.getorganslot(ORGAN_SLOT_BREATHING_TUBE)) - if(!istype(C.wear_mask, /obj/item/clothing/mask)) + var/obj/item/clothing/check + var/internals = FALSE + + for(check in C.get_internal_slots()) + if(istype(check, /obj/item/clothing/mask)) + var/obj/item/clothing/mask/M = check + if(M.mask_adjusted) + M.adjustmask(C) + if(CHECK_BITFIELD(check.clothing_flags, ALLOWINTERNALS)) + internals = TRUE + if(!internals) to_chat(C, "You are not wearing an internals mask!") - return 1 - else - var/obj/item/clothing/mask/M = C.wear_mask - if(M.mask_adjusted) // if mask on face but pushed down - M.adjustmask(C) // adjust it back - if( !(M.clothing_flags & MASKINTERNALS) ) - to_chat(C, "You are not wearing an internals mask!") - return + return var/obj/item/I = C.is_holding_item_of_type(/obj/item/tank) if(I) diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index 1245b7de94..3cc5249b56 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -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, "You need a mask!") - return - if(H.wear_mask.mask_adjusted) - H.wear_mask.adjustmask(H) - if(!(H.wear_mask.clothing_flags & MASKINTERNALS)) - to_chat(H, "[H.wear_mask] can't use [src]!") + 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, "You are not wearing an internals mask!") return if(H.internal) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 04a8e17b7b..775bbabdfd 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -437,7 +437,7 @@ item_state = "gas_alt" resistance_flags = NONE armor = list("melee" = 5, "bullet" = 5, "laser" = 5, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50) - clothing_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS + clothing_flags = BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|HIDEFACIALHAIR gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm index ed0ef27174..947aa048c4 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -4,8 +4,8 @@ icon_state = "breath" item_state = "m_mask" body_parts_covered = 0 - clothing_flags = MASKINTERNALS - visor_flags = MASKINTERNALS + clothing_flags = ALLOWINTERNALS + visor_flags = ALLOWINTERNALS w_class = WEIGHT_CLASS_SMALL gas_transfer_coefficient = 0.1 permeability_coefficient = 0.5 diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index bcf3064c49..c613d1a91e 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -2,7 +2,7 @@ name = "gas mask" desc = "A face-covering mask that can be connected to an air supply. While good for concealing your identity, it isn't good for blocking gas flow." //More accurate icon_state = "gas_alt" - clothing_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS + clothing_flags = BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS flags_inv = HIDEEARS|HIDEEYES|HIDEFACE|HIDEFACIALHAIR|HIDESNOUT w_class = WEIGHT_CLASS_NORMAL item_state = "gas_alt" @@ -59,7 +59,7 @@ /obj/item/clothing/mask/gas/clown_hat name = "clown wig and mask" desc = "A true prankster's facial attire. A clown is incomplete without his wig and mask." - clothing_flags = MASKINTERNALS + clothing_flags = ALLOWINTERNALS icon_state = "clown" item_state = "clown_hat" flags_cover = MASKCOVERSEYES @@ -91,7 +91,7 @@ /obj/item/clothing/mask/gas/sexyclown name = "sexy-clown wig and mask" desc = "A feminine clown mask for the dabbling crossdressers or female entertainers." - clothing_flags = MASKINTERNALS + clothing_flags = ALLOWINTERNALS icon_state = "sexyclown" item_state = "sexyclown" flags_cover = MASKCOVERSEYES @@ -100,7 +100,7 @@ /obj/item/clothing/mask/gas/mime name = "mime mask" desc = "The traditional mime's mask. It has an eerie facial posture." - clothing_flags = MASKINTERNALS + clothing_flags = ALLOWINTERNALS icon_state = "mime" item_state = "mime" flags_cover = MASKCOVERSEYES @@ -132,7 +132,7 @@ /obj/item/clothing/mask/gas/monkeymask name = "monkey mask" desc = "A mask used when acting as a monkey." - clothing_flags = MASKINTERNALS + clothing_flags = ALLOWINTERNALS icon_state = "monkeymask" item_state = "monkeymask" flags_cover = MASKCOVERSEYES @@ -141,7 +141,7 @@ /obj/item/clothing/mask/gas/sexymime name = "sexy mime mask" desc = "A traditional female mime's mask." - clothing_flags = MASKINTERNALS + clothing_flags = ALLOWINTERNALS icon_state = "sexymime" item_state = "sexymime" flags_cover = MASKCOVERSEYES @@ -162,7 +162,7 @@ name = "owl mask" desc = "Twoooo!" icon_state = "owl" - clothing_flags = MASKINTERNALS + clothing_flags = ALLOWINTERNALS flags_cover = MASKCOVERSEYES resistance_flags = FLAMMABLE diff --git a/code/modules/clothing/masks/hailer.dm b/code/modules/clothing/masks/hailer.dm index 8860650fbc..f004f07bf5 100644 --- a/code/modules/clothing/masks/hailer.dm +++ b/code/modules/clothing/masks/hailer.dm @@ -7,10 +7,10 @@ actions_types = list(/datum/action/item_action/halt, /datum/action/item_action/adjust) icon_state = "sechailer" item_state = "sechailer" - clothing_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS + clothing_flags = BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS flags_inv = HIDEFACIALHAIR|HIDEFACE w_class = WEIGHT_CLASS_SMALL - visor_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS + visor_flags = BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS visor_flags_inv = HIDEFACE flags_cover = MASKCOVERSMOUTH visor_flags_cover = MASKCOVERSMOUTH diff --git a/code/modules/clothing/spacesuits/_spacesuits.dm b/code/modules/clothing/spacesuits/_spacesuits.dm index 9d3918ed84..662a91c80c 100644 --- a/code/modules/clothing/spacesuits/_spacesuits.dm +++ b/code/modules/clothing/spacesuits/_spacesuits.dm @@ -4,7 +4,7 @@ name = "space helmet" icon_state = "spaceold" desc = "A special helmet with solar UV shielding to protect your eyes from harmful rays." - clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL + clothing_flags = STOPSPRESSUREDAMAGE | THICKMATERIAL | BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS item_state = "spaceold" permeability_coefficient = 0.01 armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 100, "rad" = 50, "fire" = 80, "acid" = 70) diff --git a/code/modules/mining/equipment/explorer_gear.dm b/code/modules/mining/equipment/explorer_gear.dm index 2c35c3148f..23ec02976d 100644 --- a/code/modules/mining/equipment/explorer_gear.dm +++ b/code/modules/mining/equipment/explorer_gear.dm @@ -43,7 +43,7 @@ name = "explorer gas mask" desc = "A military-grade gas mask that can be connected to an air supply." icon_state = "gas_mining" - visor_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS + visor_flags = BLOCK_GAS_SMOKE_EFFECT | ALLOWINTERNALS visor_flags_inv = HIDEFACIALHAIR visor_flags_cover = MASKCOVERSMOUTH actions_types = list(/datum/action/item_action/adjust) diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index c2c8904aa1..96e7c4310b 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -15,7 +15,7 @@ icon_state = "facehugger" item_state = "facehugger" w_class = WEIGHT_CLASS_TINY //note: can be picked up by aliens unlike most other items of w_class below 4 - clothing_flags = MASKINTERNALS + clothing_flags = ALLOWINTERNALS throw_range = 5 tint = 3 flags_cover = MASKCOVERSEYES | MASKCOVERSMOUTH diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index aa87a6e46d..2a074df420 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -238,7 +238,7 @@ if(href_list["internal"]) var/slot = text2num(href_list["internal"]) var/obj/item/ITEM = get_item_by_slot(slot) - if(ITEM && istype(ITEM, /obj/item/tank) && wear_mask && (wear_mask.clothing_flags & MASKINTERNALS)) + if(ITEM && istype(ITEM, /obj/item/tank) && wear_mask && (wear_mask.clothing_flags & ALLOWINTERNALS)) visible_message("[usr] tries to [internal ? "close" : "open"] the valve on [src]'s [ITEM.name].", \ "[usr] tries to [internal ? "close" : "open"] the valve on [src]'s [ITEM.name].") if(do_mob(usr, src, POCKET_STRIP_DELAY)) @@ -246,7 +246,7 @@ internal = null update_internals_hud_icon(0) else if(ITEM && istype(ITEM, /obj/item/tank)) - if((wear_mask && (wear_mask.clothing_flags & MASKINTERNALS)) || getorganslot(ORGAN_SLOT_BREATHING_TUBE)) + if((wear_mask && (wear_mask.clothing_flags & ALLOWINTERNALS)) || getorganslot(ORGAN_SLOT_BREATHING_TUBE)) internal = ITEM update_internals_hud_icon(1) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index d35df6b789..3dd4807251 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -77,6 +77,12 @@ s_store, ) +/mob/living/carbon/human/proc/get_internal_slots() + return list( + head, + wear_mask, + ) + //This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible() /mob/living/carbon/human/equip_to_slot(obj/item/I, slot) if(!..()) //a check failed or the item has already found its slot diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 9dd55c361e..999544d1f7 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -304,11 +304,21 @@ return /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) + if(CHECK_BITFIELD(check.clothing_flags, ALLOWINTERNALS)) + internals = TRUE if(internal) if(internal.loc != src) internal = null update_internals_hud_icon(0) - else if ((!wear_mask || !(wear_mask.clothing_flags & MASKINTERNALS)) && !getorganslot(ORGAN_SLOT_BREATHING_TUBE)) + else if (internals == FALSE && !getorganslot(ORGAN_SLOT_BREATHING_TUBE)) internal = null update_internals_hud_icon(0) else From a0a21dc01fd6d81feb9fd236035fe6dc2a3ca28d Mon Sep 17 00:00:00 2001 From: Chayse Ramsay Date: Sat, 3 Aug 2019 18:36:46 +0100 Subject: [PATCH 2/6] !iscarbon to !ishuman --- code/_onclick/hud/screen_objects.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index caa8d23df4..00ec766ea5 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -278,7 +278,7 @@ screen_loc = ui_internal /obj/screen/internals/Click() - if(!iscarbon(usr)) + if(!ishuman(usr)) return var/mob/living/carbon/human/C = usr if(C.incapacitated()) From 46e4023ba9b9f70d56390d988637c614e01ff02a Mon Sep 17 00:00:00 2001 From: Chayse Ramsay Date: Sun, 4 Aug 2019 05:07:24 +0100 Subject: [PATCH 3/6] Monkey business --- code/_onclick/hud/screen_objects.dm | 4 ++-- code/game/objects/items/tanks/tanks.dm | 2 +- code/modules/mob/living/carbon/human/inventory.dm | 6 ------ code/modules/mob/living/carbon/inventory.dm | 6 ++++++ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 00ec766ea5..75349c5789 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -278,9 +278,9 @@ screen_loc = ui_internal /obj/screen/internals/Click() - if(!ishuman(usr)) + if(!iscarbon(usr)) return - var/mob/living/carbon/human/C = usr + var/mob/living/carbon/C = usr if(C.incapacitated()) return diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index 3cc5249b56..0ddca78c95 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -23,7 +23,7 @@ toggle_internals(user) /obj/item/tank/proc/toggle_internals(mob/user) - var/mob/living/carbon/human/H = user + var/mob/living/carbon/H = user if(!istype(H)) return diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 3dd4807251..d35df6b789 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -77,12 +77,6 @@ s_store, ) -/mob/living/carbon/human/proc/get_internal_slots() - return list( - head, - wear_mask, - ) - //This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible() /mob/living/carbon/human/equip_to_slot(obj/item/I, slot) if(!..()) //a check failed or the item has already found its slot diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index bc2d6132e1..2c4627b0ee 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -140,3 +140,9 @@ /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, + ) From 0a7054c6048f043156679c2551328a768e2890c8 Mon Sep 17 00:00:00 2001 From: Chayse Ramsay Date: Sun, 4 Aug 2019 05:26:02 +0100 Subject: [PATCH 4/6] Update code/modules/mob/living/carbon/inventory.dm Co-Authored-By: deathride58 --- code/modules/mob/living/carbon/inventory.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index 2c4627b0ee..388cf81a43 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -144,5 +144,5 @@ /mob/living/carbon/proc/get_internal_slots() return list( head, - wear_mask, + wear_mask ) From 5e757f1012355d761c865b891394bdccfdd21e19 Mon Sep 17 00:00:00 2001 From: Chayse Ramsay Date: Sun, 4 Aug 2019 05:26:16 +0100 Subject: [PATCH 5/6] Update code/modules/mob/living/carbon/life.dm Co-Authored-By: deathride58 --- code/modules/mob/living/carbon/life.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 999544d1f7..9f4f7ba868 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -318,7 +318,7 @@ if(internal.loc != src) internal = null update_internals_hud_icon(0) - else if (internals == FALSE && !getorganslot(ORGAN_SLOT_BREATHING_TUBE)) + else if (!internals && !getorganslot(ORGAN_SLOT_BREATHING_TUBE)) internal = null update_internals_hud_icon(0) else From f9d829b111fd18e56e03b4734c80752229a0ecd9 Mon Sep 17 00:00:00 2001 From: Chayse Ramsay Date: Sun, 4 Aug 2019 05:48:08 +0100 Subject: [PATCH 6/6] Proc to define --- code/__DEFINES/inventory.dm | 3 +++ code/_onclick/hud/screen_objects.dm | 2 +- code/game/objects/items/tanks/tanks.dm | 2 +- code/modules/mob/living/carbon/inventory.dm | 6 ------ code/modules/mob/living/carbon/life.dm | 6 +----- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/code/__DEFINES/inventory.dm b/code/__DEFINES/inventory.dm index 03cfde802f..5e200c38c0 100644 --- a/code/__DEFINES/inventory.dm +++ b/code/__DEFINES/inventory.dm @@ -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) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 75349c5789..4c666d708c 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -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) diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index 0ddca78c95..d409e40575 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -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) diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index 2c4627b0ee..bc2d6132e1 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -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, - ) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 999544d1f7..19e04fb43c 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -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)