diff --git a/code/__DEFINES/inventory.dm b/code/__DEFINES/inventory.dm index 9f4a6231ee2..b5922c2f527 100644 --- a/code/__DEFINES/inventory.dm +++ b/code/__DEFINES/inventory.dm @@ -181,6 +181,7 @@ DEFINE_BITFIELD(no_equip_flags, list( #define HEADCOVERSMOUTH (1<<4) #define PEPPERPROOF (1<<5) //protects against pepperspray #define EARS_COVERED (1<<6) +#define ALLOW_SURGERY_THROUGH (1<<7) //item will not obstruct body part access, such as for surgery, despite covering the body part #define TINT_MILD 1.5 //Threshold of tint level to apply mild tint overlay #define TINT_DARKENED 2 //Threshold of tint level to apply weld mask overlay diff --git a/code/modules/antagonists/heretic/items/heretic_armor.dm b/code/modules/antagonists/heretic/items/heretic_armor.dm index a5b63179a96..1529284652b 100644 --- a/code/modules/antagonists/heretic/items/heretic_armor.dm +++ b/code/modules/antagonists/heretic/items/heretic_armor.dm @@ -1114,13 +1114,13 @@ // Void cloak. Turns invisible with the hood up, lets you hide stuff. /obj/item/clothing/head/hooded/cult_hoodie/void name = "void hood" - icon = 'icons/obj/clothing/head/helmet.dmi' - worn_icon = 'icons/mob/clothing/head/helmet.dmi' desc = "Black like tar, reflecting no light. Runic symbols line the outside. \ With each flash you lose comprehension of what you are seeing." + icon = 'icons/obj/clothing/head/helmet.dmi' + worn_icon = 'icons/mob/clothing/head/helmet.dmi' icon_state = "void_cloak" flags_inv = NONE - flags_cover = NONE + flags_cover = ALLOW_SURGERY_THROUGH armor_type = /datum/armor/cult_hoodie_void /datum/armor/cult_hoodie_void @@ -1221,6 +1221,7 @@ /obj/item/clothing/suit/hooded/cultrobes/void/proc/make_invisible() add_traits(list(TRAIT_NO_STRIP, TRAIT_EXAMINE_SKIP), REF(src)) RemoveElement(/datum/element/heretic_focus) + flags_cover |= ALLOW_SURGERY_THROUGH if(isliving(loc)) loc.remove_traits(list(TRAIT_RESISTLOWPRESSURE, TRAIT_RESISTCOLD), REF(src)) @@ -1232,6 +1233,7 @@ /obj/item/clothing/suit/hooded/cultrobes/void/proc/make_visible() remove_traits(list(TRAIT_NO_STRIP, TRAIT_EXAMINE_SKIP), REF(src)) AddElement(/datum/element/heretic_focus) + flags_cover &= ~ALLOW_SURGERY_THROUGH if(isliving(loc)) loc.add_traits(list(TRAIT_RESISTLOWPRESSURE, TRAIT_RESISTCOLD), REF(src)) diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index 34c6e104e29..fe4dcaca550 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -444,6 +444,8 @@ for(var/obj/item/worn_item in get_equipped_items(INCLUDE_ABSTRACT)) if(worn_item.slot_flags & exluded_equipment_slots) continue + if(worn_item.flags_cover & ALLOW_SURGERY_THROUGH) + continue covered_flags |= worn_item.body_parts_covered // NB: we have to convert covered_flags via cover_flags2body_zones here diff --git a/code/modules/unit_tests/surgeries.dm b/code/modules/unit_tests/surgeries.dm index 7a538da8fbb..a0580cd5b24 100644 --- a/code/modules/unit_tests/surgeries.dm +++ b/code/modules/unit_tests/surgeries.dm @@ -244,6 +244,10 @@ var/obj/item/clothing/under/jumpsuit = test_mob.get_item_by_slot(ITEM_SLOT_ICLOTHING) jumpsuit.adjust_to_alt() TEST_ASSERT(test_mob.is_location_accessible(BODY_ZONE_CHEST), "Chest should be accessible after rolling jumpsuit down") + jumpsuit.adjust_to_alt() + + jumpsuit.flags_cover |= ALLOW_SURGERY_THROUGH + TEST_ASSERT(test_mob.is_location_accessible(BODY_ZONE_CHEST), "Chest should be accessible if it has the ALLOW_SURGERY_THROUGH flag") /// Tests surgeries which just modify basic surgical states /datum/unit_test/state_surgeries