Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iron teeth character trait #6512

Merged
merged 3 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
14 changes: 14 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,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)
..()
Loading