From 0cfef4fae178500dac690ba18f34728f64fdaed2 Mon Sep 17 00:00:00 2001 From: Profakos Date: Mon, 15 Jul 2024 20:47:05 +0200 Subject: [PATCH] Dead raptors no longer get happy when petted or groomed (#84959) ## About The Pull Request I have noticed that when I petted a raptor corpse I have found, it started spinning and hearts appeared above it. Apparently, the same happens if you wash them. This PR makes sure that dead raptors stop spinning in their graves. I decided to not to disable the happiness component's processing on death, as the idea that the raptor's ghost looms over you, patiently waiting to be revived is funny, and also encourages their revival to be a priority. This PR also removes a duplicate animal petting proc that has not actually been hooked into anything. ## Why It's Good For The Game Dead animals should consistently act as dead animals. ## Changelog :cl: fix: Fixes dead raptors getting excited when petted or groomed /:cl: --- code/datums/components/happiness.dm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/code/datums/components/happiness.dm b/code/datums/components/happiness.dm index 0a627461192..3a45c571c7c 100644 --- a/code/datums/components/happiness.dm +++ b/code/datums/components/happiness.dm @@ -69,6 +69,11 @@ SIGNAL_HANDLER if(!COOLDOWN_FINISHED(src, groom_cooldown)) return + + var/mob/living/living_parent = parent + if (living_parent.stat != CONSCIOUS) + return + COOLDOWN_START(src, groom_cooldown, GROOM_COOLDOWN) increase_happiness_level(on_groom_change) @@ -76,15 +81,12 @@ SIGNAL_HANDLER if(!LAZYACCESS(modifiers, LEFT_CLICK) || petter.combat_mode) return - pet_animal() -/datum/component/happiness/proc/on_animal_petted(datum/source, mob/living/petter) - SIGNAL_HANDLER - - if(petter.combat_mode) + var/mob/living/living_parent = parent + if (living_parent.stat != CONSCIOUS) return + pet_animal() - return COMSIG_BASIC_ATTACK_CANCEL_CHAIN /datum/component/happiness/proc/pet_animal() if(!COOLDOWN_FINISHED(src, pet_cooldown))