Skip to content

Commit

Permalink
unstrippable trait
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Aug 10, 2023
1 parent fb0247b commit 2c89932
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@
#define TRAIT_INTENT_EYES "t_intent_eyes"
/// Masked synthetic biology. Basic medHUDs will percieve the mob as human. (Infiltrator Synths)
#define TRAIT_INFILTRATOR_SYNTH "t_infiltrator_synth"
/// Makes it impossible to strip the inventory of this mob.
#define TRAIT_UNSTRIPPABLE "t_unstrippable"

// HIVE TRAITS
/// If the Hive is a Xenonid Hive
Expand Down Expand Up @@ -251,6 +253,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_FOREIGN_BIO" = TRAIT_FOREIGN_BIO,
"TRAIT_INTENT_EYES" = TRAIT_INTENT_EYES,
"TRAIT_INFILTRATOR_SYNTH" = TRAIT_INFILTRATOR_SYNTH,
"TRAIT_UNSTRIPPABLE" = TRAIT_UNSTRIPPABLE,
"TRAIT_NESTED" = TRAIT_NESTED,
"TRAIT_CRAWLER" = TRAIT_CRAWLER,
"TRAIT_SIMPLE_DESC" = TRAIT_SIMPLE_DESC,
Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,9 @@
if(U == w_uniform)
U.remove_accessory(usr, A)
else
if(HAS_TRAIT(src, TRAIT_UNSTRIPPABLE) && !is_mob_incapacitated()) //Can't strip the unstrippable!
to_chat(usr, SPAN_DANGER("[src] has an unbreakable grip on their equipment!"))
return
visible_message(SPAN_DANGER("<B>[usr] is trying to take off \a [A] from [src]'s [U]!</B>"), null, null, 5)
if(do_after(usr, get_strip_delay(usr, src), INTERRUPT_ALL, BUSY_ICON_GENERIC, src, INTERRUPT_MOVED, BUSY_ICON_GENERIC))
if(U == w_uniform)
Expand Down
6 changes: 6 additions & 0 deletions code/modules/mob/living/carbon/human/inventory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,9 @@
return target_delay * user_speed

/mob/living/carbon/human/stripPanelUnequip(obj/item/interact_item, mob/target_mob, slot_to_process)
if(HAS_TRAIT(target_mob, TRAIT_UNSTRIPPABLE) && !target_mob.is_mob_incapacitated()) //Can't strip the unstrippable!
to_chat(src, SPAN_DANGER("[target_mob] has an unbreakable grip on their equipment!"))
return
if(interact_item.flags_item & ITEM_ABSTRACT)
return
if(interact_item.flags_item & NODROP)
Expand All @@ -528,6 +531,9 @@


/mob/living/carbon/human/stripPanelEquip(obj/item/interact_item, mob/target_mob, slot_to_process)
if(HAS_TRAIT(target_mob, TRAIT_UNSTRIPPABLE) && !target_mob.is_mob_incapacitated())
to_chat(src, SPAN_DANGER("[target_mob] is too strong to force [interact_item.name] onto them!"))
return
if(interact_item && !(interact_item.flags_item & ITEM_ABSTRACT))
if(interact_item.flags_item & NODROP)
to_chat(src, SPAN_WARNING("You can't put \the [interact_item.name] on [target_mob], it's stuck to your hand!"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
death_message = "violently gargles fluid and seizes up, the glow in their eyes dimming..."
uses_ethnicity = FALSE
burn_mod = 0.65 // made for hazardous environments, withstanding temperatures up to 1210 degrees
mob_inherent_traits = list(TRAIT_SUPER_STRONG, TRAIT_INTENT_EYES, TRAIT_EMOTE_CD_EXEMPT, TRAIT_CANNOT_EAT)
mob_inherent_traits = list(TRAIT_SUPER_STRONG, TRAIT_INTENT_EYES, TRAIT_EMOTE_CD_EXEMPT, TRAIT_CANNOT_EAT, TRAIT_UNSTRIPPABLE)

slowdown = 0.45
hair_color = "#000000"
Expand Down

0 comments on commit 2c89932

Please sign in to comment.