From a656eb127a005a98d103d3907f58a41aae789cd6 Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Sat, 17 Jan 2026 17:24:13 -0700 Subject: [PATCH] [MIRROR] Adds dodge pickup attempt option to personal space bubble (#12276) Co-authored-by: Olive <49600480+zeskorion@users.noreply.github.com> Co-authored-by: CameronSTaljaard --- code/__defines/species_traits.dm | 1 + code/modules/mob/holder.dm | 6 ++++++ .../carbon/human/species/station/traits/neutral.dm | 8 ++++++-- code/modules/mob/living/living_powers.dm | 12 ++++++++++++ 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/code/__defines/species_traits.dm b/code/__defines/species_traits.dm index 2e83746f02..df23e66af6 100644 --- a/code/__defines/species_traits.dm +++ b/code/__defines/species_traits.dm @@ -5,3 +5,4 @@ #define SPECIES_TRAIT_PATTING_DEFENCE 1 #define SPECIES_TRAIT_PERSONAL_BUBBLE 2 #define SPECIES_TRAIT_THORNS 4 +#define SPECIES_TRAIT_PICKUP_DODGE 8 diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index 9c2fa1fa2b..5222ad2b4f 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -368,6 +368,12 @@ var/list/holder_mob_icon_cache = list() if(!holder_type || buckled || pinned.len) return + // Dodge pickup if enabled by personal space bubble. + if(!self_grab && (touch_reaction_flags & SPECIES_TRAIT_PICKUP_DODGE)) + grabber.visible_message(span_notice("[src] deftly evades [grabber]'s attempt to pick them up!")) + to_chat(grabber, span_notice("[src] evaded your pickup attempt!")) + return + if(self_grab) if(src.incapacitated()) return else diff --git a/code/modules/mob/living/carbon/human/species/station/traits/neutral.dm b/code/modules/mob/living/carbon/human/species/station/traits/neutral.dm index 45dcf18528..e17d849683 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits/neutral.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits/neutral.dm @@ -1620,16 +1620,20 @@ /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." + 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, shake your hand, or pick you up. These can be toggled independently." cost = 0 custom_only = FALSE - has_preferences = list("bubble_toggle" = list(TRAIT_PREF_TYPE_BOOLEAN, "Enabled on spawn", TRAIT_NO_VAREDIT_TARGET, TRUE)) + has_preferences = list("bubble_toggle" = list(TRAIT_PREF_TYPE_BOOLEAN, "Dodge physical contact on spawn", TRAIT_NO_VAREDIT_TARGET, TRUE), + "pickup_dodge_toggle" = list(TRAIT_PREF_TYPE_BOOLEAN, "Dodge pickup attempts on spawn", TRAIT_NO_VAREDIT_TARGET, TRUE)) /datum/trait/neutral/personal_space/apply(var/datum/species/S, var/mob/living/carbon/human/H, var/list/trait_prefs) ..() if(trait_prefs && trait_prefs["bubble_toggle"]) H.touch_reaction_flags |= SPECIES_TRAIT_PERSONAL_BUBBLE + if(trait_prefs && trait_prefs["pickup_dodge_toggle"]) + H.touch_reaction_flags |= SPECIES_TRAIT_PICKUP_DODGE add_verb(H, /mob/living/proc/toggle_personal_space) + add_verb(H, /mob/living/proc/toggle_pickup_dodge) /datum/trait/neutral/colour_changing_eyes name = "Colour changing eyes" diff --git a/code/modules/mob/living/living_powers.dm b/code/modules/mob/living/living_powers.dm index b1b651a373..90fbc2c571 100644 --- a/code/modules/mob/living/living_powers.dm +++ b/code/modules/mob/living/living_powers.dm @@ -55,6 +55,18 @@ 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.")) +/mob/living/proc/toggle_pickup_dodge() + set name = "Toggle Pickup Dodge" + set desc = "Toggles dodging any attempts to pick you up." + set category = "Abilities.General" + + if(touch_reaction_flags & SPECIES_TRAIT_PICKUP_DODGE) + touch_reaction_flags &= ~(SPECIES_TRAIT_PICKUP_DODGE) + to_chat(src, span_notice("You will no longer dodge pickup attempts.")) + return + touch_reaction_flags |= SPECIES_TRAIT_PICKUP_DODGE + to_chat(src, span_notice("You will now dodge pickup attempts.")) + /mob/living/proc/toggle_thorns() set name = "Toggle Thorns" set desc = "Toggles defensive thorns across your body."