Skip to content

Commit

Permalink
Dead raptors no longer get happy when petted or groomed (tgstation#84959
Browse files Browse the repository at this point in the history
)

## 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:
  • Loading branch information
Profakos authored Jul 15, 2024
1 parent 87012dc commit 0cfef4f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions code/datums/components/happiness.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,24 @@
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)

/datum/component/happiness/proc/on_petted(datum/source, mob/living/petter, list/modifiers)
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))
Expand Down

0 comments on commit 0cfef4f

Please sign in to comment.