From 11de395d047da0beabb564938b9623695f5df00c Mon Sep 17 00:00:00 2001 From: Olive <49600480+zeskorion@users.noreply.github.com> Date: Sat, 17 Jan 2026 08:31:03 -0800 Subject: [PATCH] Adds dodge pickup attempt option to personal space bubble (#18938) * Add QoL option to dodge pick up attempts with personal space bubble traits * whitespalce * thar she blows --------- 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 2e83746f02a..df23e66af62 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 1847728390d..26cb8743180 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -358,6 +358,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 65527dff886..b7efbb8497e 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 @@ -1617,16 +1617,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 b1b651a373f..90fbc2c571e 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."