mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 20:47:43 +01:00
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 <cameronstaljaard@gmail.com>
This commit is contained in:
co-authored by
CameronSTaljaard
parent
87f866c856
commit
11de395d04
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user