diff --git a/code/__defines/species_traits.dm b/code/__defines/species_traits.dm new file mode 100644 index 00000000000..8b44872b4e7 --- /dev/null +++ b/code/__defines/species_traits.dm @@ -0,0 +1,6 @@ +//////flag defines specifically for species traits + +//touch reaction flags + +#define SPECIES_TRAIT_PATTING_DEFENCE 1 +#define SPECIES_TRAIT_PERSONAL_BUBBLE 2 diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 77b07ad7985..854148502c9 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -466,19 +466,44 @@ t_him = "him" if(FEMALE) t_him = "her" + + if(target.touch_reaction_flags & SPECIES_TRAIT_PERSONAL_BUBBLE) + H.visible_message( \ + span_notice("[target] moves to avoid being touched by [H]!"), \ + span_notice("[target] moves to avoid being touched by you!"), ) + return + //VOREStation Edit Start - Headpats and Handshakes. if(H.zone_sel.selecting == "head") - H.visible_message( \ - span_notice("[H] pats [target] on the head."), \ - span_notice("You pat [target] on the head."), ) + if(target.touch_reaction_flags & SPECIES_TRAIT_PATTING_DEFENCE) + H.visible_message( \ + span_warning("[target] reflexively bites the hand of [H] to prevent head patting!"), \ + span_warning("[target] reflexively bites your hand!"), ) + if(H.hand) + H.apply_damage(1, BRUTE, BP_L_HAND) + else + H.apply_damage(1, BRUTE, BP_R_HAND) + else + H.visible_message( \ + span_notice("[H] pats [target] on the head."), \ + span_notice("You pat [target] on the head."), ) else if(H.zone_sel.selecting == "r_hand" || H.zone_sel.selecting == "l_hand") H.visible_message( \ span_notice("[H] shakes [target]'s hand."), \ span_notice("You shake [target]'s hand."), ) else if(H.zone_sel.selecting == "mouth") - H.visible_message( \ - span_notice("[H] boops [target]'s nose."), \ - span_notice("You boop [target] on the nose."), ) + if(target.touch_reaction_flags & SPECIES_TRAIT_PATTING_DEFENCE) + H.visible_message( \ + span_warning("[target] reflexively bites the hand of [H] to prevent nose booping!"), \ + span_warning("[target] reflexively bites your hand!"), ) + if(H.hand) + H.apply_damage(1, BRUTE, BP_L_HAND) + else + H.apply_damage(1, BRUTE, BP_R_HAND) + else + H.visible_message( \ + span_notice("[H] boops [target]'s nose."), \ + span_notice("You boop [target] on the nose."), ) //VOREStation Edit End else H.visible_message(span_notice("[H] hugs [target] to make [t_him] feel better!"), \ diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm index fdecb1c875c..993c760626b 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/neutral.dm @@ -1414,3 +1414,25 @@ cost = 0 var_changes = list("mudking" = TRUE) custom_only = FALSE + +/datum/trait/neutral/patting_defence + name = "Reflexive Biting" + desc = "You will reflexively bite hands that attempt to pat your head or boop your nose, this can be toggled off." + cost = 0 + custom_only = FALSE + +/datum/trait/neutral/patting_defence/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + H.touch_reaction_flags |= SPECIES_TRAIT_PATTING_DEFENCE + add_verb(H, /mob/living/proc/toggle_patting_defence) + +/datum/trait/neutral/personal_space + name = "Personal Space Bubble" + desc = "You are adept at avoiding unwanted physical contact and dodge it with ease. You will reflexively dodge any attempt to hug, pat, boop, lick, sniff you or even shake your hand, this can be toggled off." + cost = 0 + custom_only = FALSE + +/datum/trait/neutral/patting_defence/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + H.touch_reaction_flags |= SPECIES_TRAIT_PERSONAL_BUBBLE + add_verb(H, /mob/living/proc/toggle_personal_space) diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index db9a065e46f..de04366b180 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -105,3 +105,5 @@ "'s hands are shaking.", " is rocking slightly from side to side." ) + + var/touch_reaction_flags diff --git a/code/modules/mob/living/living_powers.dm b/code/modules/mob/living/living_powers.dm index 678adca4baa..4735f0d9d5c 100644 --- a/code/modules/mob/living/living_powers.dm +++ b/code/modules/mob/living/living_powers.dm @@ -30,3 +30,27 @@ to_chat(src, span_notice("You will [allow_self_surgery ? "now" : "no longer"] attempt to operate upon yourself.")) log_admin("DEBUG \[[world.timeofday]\]: [src.ckey ? "[src.name]:([src.ckey])" : "[src.name]"] has [allow_self_surgery ? "Enabled" : "Disabled"] self surgery.") + +/mob/living/proc/toggle_patting_defence() + set name = "Toggle Reflexive Biting" + set desc = "Toggles the automatic biting for if someone pats you on the head or boops your nose." + set category = "Abilities.General" + + if(touch_reaction_flags & SPECIES_TRAIT_PATTING_DEFENCE) + touch_reaction_flags &= ~(SPECIES_TRAIT_PATTING_DEFENCE) + to_chat(src,span_notice("You will no longer bite hands who pat or boop you.")) + else + touch_reaction_flags |= SPECIES_TRAIT_PATTING_DEFENCE + to_chat(src,span_notice("You will now longer bite hands who pat or boop you.")) + +/mob/living/proc/toggle_personal_space() + set name = "Toggle Personal Space" + set desc = "Toggles dodging any attempts to hug or pat you." + set category = "Abilities.General" + + if(touch_reaction_flags & SPECIES_TRAIT_PERSONAL_BUBBLE) + touch_reaction_flags &= ~(SPECIES_TRAIT_PERSONAL_BUBBLE) + to_chat(src,span_notice("You will no longer dodge all attempts at hugging, patting, booping, licking, smelling and hand shaking.")) + else + touch_reaction_flags |= SPECIES_TRAIT_PERSONAL_BUBBLE + to_chat(src,span_notice("You will now dodge all attempts at hugging, patting, booping, licking, smelling and hand shaking.")) diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index c96366e70ee..c465cc407f6 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -530,15 +530,17 @@ return setClickCooldown(DEFAULT_ATTACK_COOLDOWN) + if(tasted == src) visible_message(span_vwarning("[src] licks themself!"),span_notice("You lick yourself. You taste rather like [tasted.get_taste_message()]."),span_infoplain(span_bold("Slurp!"))) //balloon_alert_visible("licks themself!", "tastes like [tasted.get_taste_message()]") else + if((tasted.touch_reaction_flags & SPECIES_TRAIT_PERSONAL_BUBBLE) && (!tasted.grabbed_by.len || !tasted.stat)) + visible_message(span_warning("[src] tries to lick [tasted], but they dodge out of the way!"),span_warning("You try to lick [tasted], but they deftly avoid your attempt.")) + return visible_message(span_vwarning("[src] licks [tasted]!"),span_notice("You lick [tasted]. They taste rather like [tasted.get_taste_message()]."),span_infoplain(span_bold("Slurp!"))) //balloon_alert_visible("licks [tasted]!", "tastes like [tasted.get_taste_message()]") - - /mob/living/proc/get_taste_message(allow_generic = 1) if(!vore_taste && !allow_generic) return FALSE @@ -575,14 +577,17 @@ return setClickCooldown(DEFAULT_ATTACK_COOLDOWN) + if(smelled == src) visible_message(span_vwarning("[src] smells themself!"),span_notice("You smell yourself. You smell like [smelled.get_smell_message()]."),span_infoplain(span_bold("Sniff!"))) //balloon_alert_visible("smells themself!", "smells like [smelled.get_smell_message()]") else + if((smelled.touch_reaction_flags & SPECIES_TRAIT_PERSONAL_BUBBLE) && (!smelled.grabbed_by.len || !smelled.stat)) + visible_message(span_warning("[src] tries to smell [smelled], but they dodge out of the way!"),span_warning("You try to smell [smelled], but they deftly avoid your attempt.")) + return visible_message(span_vwarning("[src] smells [smelled]!"),span_notice("You smell [smelled]. They smell like [smelled.get_smell_message()]."),span_infoplain(span_bold("Sniff!"))) //balloon_alert_visible("smells [smelled]!", "smells like [smelled.get_smell_message()]") - /mob/living/proc/get_smell_message(allow_generic = 1) if(!vore_smell && !allow_generic) return FALSE diff --git a/vorestation.dme b/vorestation.dme index dc5e38531cd..46510187ab3 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -141,6 +141,7 @@ #include "code\__defines\span.dm" #include "code\__defines\species_languages.dm" #include "code\__defines\species_languages_vr.dm" +#include "code\__defines\species_traits.dm" #include "code\__defines\speech_channels.dm" #include "code\__defines\spells.dm" #include "code\__defines\sprite_sheets.dm"