From e895024e65c9748b82d5dd96a54238984152377b Mon Sep 17 00:00:00 2001 From: AndroBetel <44546836+AndroBetel@users.noreply.github.com> Date: Fri, 5 Jul 2024 02:43:47 +0300 Subject: [PATCH] iron teeth character trait (#6512) # About the pull request adds "iron teeth" trait for 1 point that allows marines to hold stuff in their face slot with no fear of it falling out when they drop # Explain why it's good for the game i tried to larp as rambo and my combat knife fell out of my mouth and i thought man you can only hold minor shit in your face slot would it be cool if it was a little more useful so here we are besides more character traits is good theres a shortage of them i think # Testing Photographs and Procedure
Screenshots & Videos got the trait... put a knife in my mouth... rested... hit myself with an explosion to stun... knife was still in my mouth... no runtimes
# Changelog :cl: add: Adds "Iron teeth" trait. /:cl: --------- Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com> Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com> --- code/__DEFINES/traits.dm | 2 ++ code/datums/elements/mouth_drop_item.dm | 2 +- code/modules/character_traits/biology_traits.dm | 14 ++++++++++++++ 3 files changed, 17 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..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) + ..()