Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
AndroBetel committed Jun 19, 2024
1 parent fbfdddb commit bdacb91
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/datums/elements/mouth_drop_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
13 changes: 13 additions & 0 deletions code/modules/character_traits/biology_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
..()

0 comments on commit bdacb91

Please sign in to comment.