Skip to content

Commit 8844c62

Browse files
authored
Makes it easier to poke and annoy your colleagues than ever before. Also makes it so that hugging or shaking someone's hand requires you to grab them first. (#4868)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request This PR changes hugging so that it requires that one grabs the person they wish to hug first. If one clicks on another character without grabbing someone, they end up poking them instead. This PR also makes it so that you need to grab someone in order to shake their hand. Otherwise, you just pat the person on the shoulder instead. This PR also fixes a bug where shaking someone up from a lying down position would call both text for shaking them up, as well as text for a specific body region. Before: ![image](https://github.com/user-attachments/assets/6243bd6d-a107-4a31-9ed0-d882068d9510) After: ![image](https://github.com/user-attachments/assets/e84425eb-b8f4-4309-8cb3-599076718b85) ## Why It's Good For The Game I've always found it a little silly that one could accidentally click on another character and hug them that way. This change should make it so that the more realistic scenario of tapping or poking someone happens instead. It also ensures that if someone wants to hug someone else, there is proper intent behind it. This also ties into bear hugs, which require an aggressive grab to function, so this would end up making hugs follow a logical sequence of intent. It also makes sense to have to grab someone before shaking their hand, I think, for a similar reason, in that it signals intent better. ## Changelog :cl: balance: hugs now require grabbing the person to be hugged -- not doing so pokes that person instead. The same is true for shaking one's hand. fix: fixes shaking someone up also poking them or patting them at the same time /:cl: <!-- Both :cl:'s are required for the changelog to work! You can put your name to the right of the first :cl: if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. -->
1 parent 522d67d commit 8844c62

File tree

1 file changed

+29
-22
lines changed

1 file changed

+29
-22
lines changed

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

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@
434434
if(istype(dna.species, /datum/species/moth))
435435
M.mothdust += 10; // End WS edit
436436

437-
if(M.zone_selected == BODY_ZONE_PRECISE_MOUTH) // Nose boops!
437+
else if(M.zone_selected == BODY_ZONE_PRECISE_MOUTH) // Nose boops!
438438
nosound = TRUE
439439
playsound(src, 'sound/effects/boop.ogg', 50, 0)
440440
if (HAS_TRAIT(M, TRAIT_FRIENDLY))
@@ -471,9 +471,12 @@
471471
null, span_hear("You hear the rustling of clothes."), DEFAULT_MESSAGE_RANGE, list(M, src))
472472
to_chat(M, span_notice("You wrap [src] into a tight bear hug!"))
473473
to_chat(src, span_notice("[M] squeezes you super tightly in a firm bear hug!"))
474-
else
474+
else if((M.grab_state == GRAB_PASSIVE) && (M.pulling))
475475
M.visible_message(span_notice("[M] hugs [src] to make [p_them()] feel better!"), \
476476
span_notice("You hug [src] to make [p_them()] feel better!"))
477+
else
478+
M.visible_message(span_notice("[M] pokes [src]."), \
479+
span_notice("You poke [src]."))
477480
if(istype(M.dna.species, /datum/species/moth)) //WS edit - moth dust from hugging
478481
mothdust += 15;
479482
if(istype(dna.species, /datum/species/moth))
@@ -497,32 +500,36 @@
497500
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "hug", /datum/mood_event/bad_touch_bear_hug)
498501

499502
// Let people know if they hugged someone really warm or really cold
500-
if(M.bodytemperature > M.dna.species.bodytemp_heat_damage_limit)
501-
to_chat(src, span_warning("It feels like [M] is over heating as they hug you."))
502-
else if(M.bodytemperature < M.dna.species.bodytemp_cold_damage_limit)
503-
to_chat(src, span_warning("It feels like [M] is freezing as they hug you."))
504-
505-
if(bodytemperature > dna.species.bodytemp_heat_damage_limit)
506-
to_chat(M, span_warning("It feels like [src] is over heating as you hug them."))
507-
else if(bodytemperature < dna.species.bodytemp_cold_damage_limit)
508-
to_chat(M, span_warning("It feels like [src] is freezing as you hug them."))
509-
510-
if(HAS_TRAIT(M, TRAIT_FRIENDLY))
511-
if (hugger_mood.sanity >= SANITY_GREAT)
512-
new /obj/effect/temp_visual/heart(loc)
513-
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/besthug, M)
514-
else if (hugger_mood.sanity >= SANITY_DISTURBED)
515-
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/betterhug, M)
516-
517-
if(HAS_TRAIT(src, TRAIT_BADTOUCH))
518-
to_chat(M, span_warning("[src] looks visibly upset as you hug [p_them()]."))
503+
if ((M.grab_state == GRAB_PASSIVE) && (M.pulling))
504+
if(M.bodytemperature > M.dna.species.bodytemp_heat_damage_limit)
505+
to_chat(src, span_warning("It feels like [M] is over heating as they hug you."))
506+
else if(M.bodytemperature < M.dna.species.bodytemp_cold_damage_limit)
507+
to_chat(src, span_warning("It feels like [M] is freezing as they hug you."))
508+
509+
if(bodytemperature > dna.species.bodytemp_heat_damage_limit)
510+
to_chat(M, span_warning("It feels like [src] is over heating as you hug them."))
511+
else if(bodytemperature < dna.species.bodytemp_cold_damage_limit)
512+
to_chat(M, span_warning("It feels like [src] is freezing as you hug them."))
513+
514+
if(HAS_TRAIT(M, TRAIT_FRIENDLY))
515+
if (hugger_mood.sanity >= SANITY_GREAT)
516+
new /obj/effect/temp_visual/heart(loc)
517+
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/besthug, M)
518+
else if (hugger_mood.sanity >= SANITY_DISTURBED)
519+
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "friendly_hug", /datum/mood_event/betterhug, M)
520+
521+
if(HAS_TRAIT(src, TRAIT_BADTOUCH))
522+
to_chat(M, span_warning("[src] looks visibly upset as you hug [p_them()]."))
519523

520524
else if((M.zone_selected == BODY_ZONE_L_ARM) || (M.zone_selected == BODY_ZONE_R_ARM))
521525
if(!get_bodypart(check_zone(M.zone_selected)))
522526
to_chat(M, span_warning("[src] does not have a [M.zone_selected == BODY_ZONE_L_ARM ? "left" : "right"] arm!"))
523-
else
527+
else if((M.grab_state == GRAB_PASSIVE) && (M.pulling))
524528
M.visible_message(span_notice("[M] shakes [src]'s hand."), \
525529
span_notice("You shake [src]'s hand."))
530+
else
531+
M.visible_message(span_notice("[M] pats [src] on the shoulder."), \
532+
span_notice("You pat [src] on the shoulder."))
526533
else if((M.zone_selected == BODY_ZONE_L_LEG) || (M.zone_selected == BODY_ZONE_R_LEG))
527534
if(!get_bodypart(check_zone(M.zone_selected)))
528535
to_chat(M, span_warning("[src] does not have a [M.zone_selected == BODY_ZONE_L_LEG ? "left" : "right"] leg!"))

0 commit comments

Comments
 (0)