Personal space quirk (#8230)

* replaces "iron ass" trait with "personal space"

* ass-slapping with the personalspace trait now also checks for combat mode

* re-adds Iron Ass for Player ChoiceTM

* minor punctuation fix + added to trait description

* fixes ironass value

* add checks for counterattacks

* Update code/modules/mob/living/carbon/carbon_defense.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update modular_skyrat/master_files/code/datums/traits/neutral.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update code/__DEFINES/~skyrat_defines/traits.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Update modular_skyrat/master_files/code/datums/traits/neutral.dm

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* reremoves Iron Ass

* replaces magic numbers with defs

* remove TRAIT_IRONASS

* removes IRON_ASS check from carbon_defense

* Let's get this over with

* Of course I had to forget some of them...

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
This commit is contained in:
faaaay
2021-12-03 21:34:46 -05:00
committed by GitHub
co-authored by GoldenAlpharex
parent cf6e61c250
commit 8317e7f72a
3 changed files with 31 additions and 19 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
#define TRAIT_NORUNNING "norunning" // You walk!
#define TRAIT_EXCITABLE "wagwag" //Will wag when patted!
#define TRAIT_OXYIMMUNE "oxyimmune" // Immune to oxygen damage, ideally give this to all non-breathing species or bad stuff will happen
#define TRAIT_IRONASS "ironass"
#define TRAIT_PERSONALSPACE "personalspace" // Block/counter-attack ass-slaps
#define TRAIT_MOOD_NOEXAMINE "mood_noexamine" // Can't assess your own mood
#define TRAIT_DNR "cant_revive" //You just can't be revived without supernatural means
#define TRAIT_HARD_SOLES "hard_soles" // No step on glass
@@ -1,4 +1,6 @@
#define SHAKE_ANIMATION_OFFSET 4
#define PERSONAL_SPACE_DAMAGE 2
#define ASS_SLAP_EXTRA_RANGE -1
/mob/living/carbon/get_eye_protection()
. = ..()
@@ -269,19 +271,27 @@
return
//SKYRAT EDIT ADDITION BEGIN - EMOTES
if(zone_selected == BODY_ZONE_PRECISE_GROIN && target.dir == src.dir)
if(HAS_TRAIT(target, TRAIT_IRONASS))
var/obj/item/bodypart/affecting = src.get_bodypart("[(src.active_hand_index % 2 == 0) ? "r" : "l" ]_arm")
if(affecting?.receive_damage(2))
src.update_damage_overlays()
visible_message("<span class='danger'>[src] tried slapping [target]'s ass, however it was much harder than expected!</span>",
"<span class='danger'>You tried slapping [target]'s ass, but it felt like metal, ouch!</span>",\
"You hear a sore sounding slap.", ignored_mobs = list(target))
playsound(target.loc, 'sound/effects/snap.ogg', 50, TRUE, -1)
to_chat(target, "<span class='danger'>[src] tried slapping your ass, but it was deflected!")
return
if(HAS_TRAIT(target, TRAIT_PERSONALSPACE) && (target.stat != UNCONSCIOUS) && (!target.handcuffed)) //You need to be conscious and uncuffed to use Personal Space
if(target.combat_mode && (!HAS_TRAIT(target, TRAIT_PACIFISM))) //Being pacified prevents violent counters
var/obj/item/bodypart/affecting = src.get_bodypart(BODY_ZONE_HEAD)
if(affecting?.receive_damage(PERSONAL_SPACE_DAMAGE))
src.update_damage_overlays()
visible_message(span_danger("[src] tried slapping [target]'s ass, but they were slapped instead!"),
span_danger("You tried slapping [target]'s ass, but they hit you back, ouch!"),
"You hear a slap.", ignored_mobs = list(target))
playsound(target.loc, 'sound/effects/snap.ogg', 50, TRUE, ASS_SLAP_EXTRA_RANGE)
to_chat(target, span_danger("[src] tried slapping your ass, but you hit them back!"))
return
else
visible_message(span_danger("[src] tried slapping [target]'s ass, but they were blocked!"),
span_danger("You tried slapping [target]'s ass, but they blocked you!"),
"You hear a slap.", ignored_mobs = list(target))
playsound(target.loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, ASS_SLAP_EXTRA_RANGE)
to_chat(target, span_danger("[src] tried slapping your ass, but you blocked them!"))
return
else
do_ass_slap_animation(target)
playsound(target.loc, 'sound/weapons/slap.ogg', 50, TRUE, -1)
playsound(target.loc, 'sound/weapons/slap.ogg', 50, TRUE, ASS_SLAP_EXTRA_RANGE)
visible_message("<span class='danger'>[src] slaps [target] right on the ass!</span>",\
"<span class='notice'>You slap [target] on the ass, how satisfying.</span>",\
"You hear a slap.", ignored_mobs = list(target))
@@ -784,3 +794,5 @@
return TRUE
#undef SHAKE_ANIMATION_OFFSET
#undef PERSONAL_SPACE_DAMAGE
#undef ASS_SLAP_EXTRA_RANGE