diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 7b669124a2d0..964e77402655 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -233,6 +233,8 @@ #define TRAIT_IN_TUTORIAL "t_IN_TUTORIAL" /// If the mob is cloaked in any form #define TRAIT_CLOAKED "t_cloaked" +/// If the mob won't drop items held in face slot when downed +#define TRAIT_IRON_TEETH "t_iron_teeth" // -- ability traits -- /// Xenos with this trait cannot have plasma transfered to them diff --git a/code/datums/elements/mouth_drop_item.dm b/code/datums/elements/mouth_drop_item.dm index 7a546c6b3933..f27e1b928b7d 100644 --- a/code/datums/elements/mouth_drop_item.dm +++ b/code/datums/elements/mouth_drop_item.dm @@ -18,7 +18,7 @@ /datum/element/mouth_drop_item/proc/item_equipped(obj/item/I, mob/living/carbon/human/user, slot) SIGNAL_HANDLER - if(slot == WEAR_FACE) + if(slot == WEAR_FACE && !HAS_TRAIT(user, TRAIT_IRON_TEETH)) I.RegisterSignal(user, COMSIG_LIVING_SET_BODY_POSITION, TYPE_PROC_REF(/obj/item, drop_to_floor)) /datum/element/mouth_drop_item/proc/item_dropped(obj/item/I, mob/living/carbon/human/user) diff --git a/code/modules/character_traits/biology_traits.dm b/code/modules/character_traits/biology_traits.dm index 2220f8f82fd2..5bdb67cc5419 100644 --- a/code/modules/character_traits/biology_traits.dm +++ b/code/modules/character_traits/biology_traits.dm @@ -130,3 +130,17 @@ /datum/character_trait/biology/hardcore/unapply_trait(mob/living/carbon/human/target) REMOVE_TRAIT(target, TRAIT_HARDCORE, ROUNDSTART_TRAIT) ..() + +/datum/character_trait/biology/iron_teeth + trait_name = "Iron Teeth" + trait_desc = "You've got iron teeth or really good dental insurance. Items in your face slot won't fall out when you go down." + applyable = TRUE + cost = 1 + +/datum/character_trait/biology/iron_teeth/apply_trait(mob/living/carbon/human/target, datum/equipment_preset/preset) + ADD_TRAIT(target, TRAIT_IRON_TEETH, ROUNDSTART_TRAIT) + ..() + +/datum/character_trait/biology/iron_teeth/unapply_trait(mob/living/carbon/human/target) + REMOVE_TRAIT(target, TRAIT_IRON_TEETH, ROUNDSTART_TRAIT) + ..()