From 8ad2bc039876155d3c2cee967e1c68387737a221 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 23 Apr 2023 21:58:36 +0100 Subject: [PATCH] [MIRROR] Fixes yawns not propagating [MDB IGNORE] (#20714) * Fixes yawns not propagating (#74909) ## About The Pull Request #62639 was supposed to make it so yawning had a chance to make other nearby people yawn, depending on RNG and how close they were to you. It was also meant as a way to sniff out if someone had maybe recently examined you, by logic that watching someone yawn usually makes you yawn. I eff'd up and used a wrong variable, making it so no one would ever propagate a yawn, because it would check when the original yawner last yawned (obviously which was immediately) instead of the person being queried for a yawn. ## Why It's Good For The Game Makes something that got merged forever ago actually work ## Changelog :cl: Ryll/Shaps fix: Yawning will now have a chance of making people near you yawn as well, and is guaranteed to make them yawn if they examined you in the last 2 seconds. It was supposed to already do that, but now it'll actually do that /:cl: * Fixes yawns not propagating --------- Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com> --- code/modules/mob/living/emote.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 8b4c67ce3cc..8c2e117d4d4 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -459,9 +459,9 @@ message = "smiles weakly." /// The base chance for your yawn to propagate to someone else if they're on the same tile as you -#define YAWN_PROPAGATE_CHANCE_BASE 60 +#define YAWN_PROPAGATE_CHANCE_BASE 40 /// The base chance for your yawn to propagate to someone else if they're on the same tile as you -#define YAWN_PROPAGATE_CHANCE_DECAY 10 +#define YAWN_PROPAGATE_CHANCE_DECAY 8 /datum/emote/living/yawn key = "yawn" @@ -469,11 +469,11 @@ message = "yawns." message_mime = "acts out an exaggerated silent yawn." emote_type = EMOTE_VISIBLE | EMOTE_AUDIBLE - cooldown = 3 SECONDS + cooldown = 5 SECONDS /datum/emote/living/yawn/run_emote(mob/user, params, type_override, intentional) . = ..() - if(!. || !isliving(user)) + if(!isliving(user)) return if(!TIMER_COOLDOWN_CHECK(user, COOLDOWN_YAWN_PROPAGATION)) @@ -486,7 +486,7 @@ var/propagation_distance = user.client ? 5 : 2 // mindless mobs are less able to spread yawns for(var/mob/living/iter_living in view(user, propagation_distance)) - if(IS_DEAD_OR_INCAP(iter_living) || TIMER_COOLDOWN_CHECK(user, COOLDOWN_YAWN_PROPAGATION)) + if(IS_DEAD_OR_INCAP(iter_living) || TIMER_COOLDOWN_CHECK(iter_living, COOLDOWN_YAWN_PROPAGATION)) continue var/dist_between = get_dist(user, iter_living)