From bdacb91b0c8c6b1d04d5e696ed1fffd1e82de48d Mon Sep 17 00:00:00 2001 From: AndroBetel <44546836+AndroBetel@users.noreply.github.com> Date: Thu, 20 Jun 2024 02:59:52 +0300 Subject: [PATCH 1/3] 1 --- code/__DEFINES/traits.dm | 2 ++ code/datums/elements/mouth_drop_item.dm | 2 +- code/modules/character_traits/biology_traits.dm | 13 +++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) 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..8bf0b65f57ee 100644 --- a/code/modules/character_traits/biology_traits.dm +++ b/code/modules/character_traits/biology_traits.dm @@ -130,3 +130,16 @@ /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/lisp/unapply_trait(mob/living/carbon/human/target) + REMOVE_TRAIT(target, TRAIT_IRON_TEETH, ROUNDSTART_TRAIT) + ..() From 1242b3e283c86b8350782bacfde74e292480c8b2 Mon Sep 17 00:00:00 2001 From: AndroBetel <44546836+AndroBetel@users.noreply.github.com> Date: Wed, 3 Jul 2024 13:10:18 +0300 Subject: [PATCH 2/3] Update code/modules/character_traits/biology_traits.dm Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> --- code/modules/character_traits/biology_traits.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/character_traits/biology_traits.dm b/code/modules/character_traits/biology_traits.dm index 8bf0b65f57ee..f09a1949376c 100644 --- a/code/modules/character_traits/biology_traits.dm +++ b/code/modules/character_traits/biology_traits.dm @@ -140,6 +140,6 @@ ADD_TRAIT(target, TRAIT_IRON_TEETH, ROUNDSTART_TRAIT) ..() -/datum/character_trait/biology/lisp/unapply_trait(mob/living/carbon/human/target) +/datum/character_trait/biology/iron_teeth/unapply_trait(mob/living/carbon/human/target) REMOVE_TRAIT(target, TRAIT_IRON_TEETH, ROUNDSTART_TRAIT) ..() From 137b1e3271183cc98580971a02b3184bf788cb94 Mon Sep 17 00:00:00 2001 From: Zonespace <41448081+Zonespace27@users.noreply.github.com> Date: Fri, 5 Jul 2024 01:35:18 +0200 Subject: [PATCH 3/3] Update biology_traits.dm --- code/modules/character_traits/biology_traits.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/character_traits/biology_traits.dm b/code/modules/character_traits/biology_traits.dm index f09a1949376c..5bdb67cc5419 100644 --- a/code/modules/character_traits/biology_traits.dm +++ b/code/modules/character_traits/biology_traits.dm @@ -136,6 +136,7 @@ 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) ..()