diff --git a/code/__DEFINES/sound.dm b/code/__DEFINES/sound.dm index 4335d535ee6..f27e5473778 100644 --- a/code/__DEFINES/sound.dm +++ b/code/__DEFINES/sound.dm @@ -184,4 +184,6 @@ GLOBAL_LIST_INIT(announcer_keys, list( #define SFX_DEFAULT_FISH_SLAP "default_fish_slap" #define SFX_ALT_FISH_SLAP "alt_fish_slap" #define SFX_FISH_PICKUP "fish_pickup" +#define SFX_CAT_MEOW "cat_meow" +#define SFX_CAT_PURR "cat_purr" #define SFX_LIQUID_POUR "liquid_pour" diff --git a/code/datums/ai/basic_mobs/basic_subtrees/speech_subtree.dm b/code/datums/ai/basic_mobs/basic_subtrees/speech_subtree.dm index 0e6780adeac..7d877731e2b 100644 --- a/code/datums/ai/basic_mobs/basic_subtrees/speech_subtree.dm +++ b/code/datums/ai/basic_mobs/basic_subtrees/speech_subtree.dm @@ -216,11 +216,9 @@ /datum/ai_planning_subtree/random_speech/cats speech_chance = 10 - speak = list( - "mrawww!", - "meow!", - "maw!", - ) + sound = list(SFX_CAT_MEOW) + emote_hear = list("meows.") + emote_see = list("meows.") /datum/ai_planning_subtree/random_speech/blackboard //literal tower of babel, subtree form speech_chance = 1 diff --git a/code/datums/elements/pet_bonus.dm b/code/datums/elements/pet_bonus.dm index 5ef8b515077..a802c363f44 100644 --- a/code/datums/elements/pet_bonus.dm +++ b/code/datums/elements/pet_bonus.dm @@ -8,6 +8,8 @@ element_flags = ELEMENT_BESPOKE argument_hash_start_idx = 2 + ///string key of the emote to do when pet. + var/emote_name ///optional cute message to send when you pet your pet! var/emote_message ///actual moodlet given, defaults to the pet animal one @@ -19,6 +21,7 @@ return ELEMENT_INCOMPATIBLE src.emote_message = emote_message + src.emote_name = emote_name src.moodlet = moodlet RegisterSignal(target, COMSIG_ATOM_ATTACK_HAND, PROC_REF(on_attack_hand)) @@ -36,4 +39,6 @@ SEND_SIGNAL(pet, COMSIG_ANIMAL_PET, petter, modifiers) if(emote_message && prob(33)) pet.manual_emote(emote_message) + if(emote_name) + INVOKE_ASYNC(pet, TYPE_PROC_REF(/mob, emote), emote_name) petter.add_mood_event("petting_bonus", moodlet, pet) diff --git a/code/game/sound.dm b/code/game/sound.dm index 307299a0075..ee91eebffa1 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -525,4 +525,18 @@ 'sound/effects/liquid_pour/liquid_pour2.ogg', 'sound/effects/liquid_pour/liquid_pour3.ogg', ) + if(SFX_CAT_MEOW) + soundin = pick_weight(list( + 'sound/creatures/cat/cat_meow1.ogg' = 33, + 'sound/creatures/cat/cat_meow2.ogg' = 33, + 'sound/creatures/cat/cat_meow3.ogg' = 33, + 'sound/creatures/cat/oranges_meow1.ogg' = 1, + )) + if(SFX_CAT_PURR) + soundin = pick( + 'sound/creatures/cat/cat_purr1.ogg', + 'sound/creatures/cat/cat_purr2.ogg', + 'sound/creatures/cat/cat_purr3.ogg', + 'sound/creatures/cat/cat_purr4.ogg', + ) return soundin diff --git a/code/modules/mob/living/basic/pets/cat/cat.dm b/code/modules/mob/living/basic/pets/cat/cat.dm index 596308fdee1..d91052a6816 100644 --- a/code/modules/mob/living/basic/pets/cat/cat.dm +++ b/code/modules/mob/living/basic/pets/cat/cat.dm @@ -52,12 +52,29 @@ ///icon state of our cult icon var/cult_icon_state = "cat_cult" +/datum/emote/living/basic/pet/cat/meow + key = "meow" + key_third_person = "meows" + message = "meows!" + emote_type = EMOTE_VISIBLE | EMOTE_AUDIBLE + vary = TRUE + sound = SFX_CAT_MEOW + +/datum/emote/living/basic/pet/cat/purr + key = "purr" + key_third_person = "purrs" + message = "purrs." + emote_type = EMOTE_VISIBLE | EMOTE_AUDIBLE + vary = TRUE + sound = SFX_CAT_PURR + + /mob/living/basic/pet/cat/Initialize(mapload) . = ..() AddElement(/datum/element/cultist_pet, pet_cult_icon_state = cult_icon_state) AddElement(/datum/element/wears_collar, collar_icon_state = collar_icon_state, collar_resting_icon_state = TRUE) AddElement(/datum/element/ai_retaliate) - AddElement(/datum/element/pet_bonus, "purrs!") + AddElement(/datum/element/pet_bonus, null, /datum/mood_event/pet_animal, "purr") AddElement(/datum/element/footstep, footstep_type = FOOTSTEP_MOB_CLAW) add_cell_sample() add_verb(src, /mob/living/proc/toggle_resting) diff --git a/sound/creatures/cat/attribution.txt b/sound/creatures/cat/attribution.txt new file mode 100644 index 00000000000..66180d00b10 --- /dev/null +++ b/sound/creatures/cat/attribution.txt @@ -0,0 +1,10 @@ +{ +cat_meow1.ogg +cat_meow2.ogg +cat_meow3.ogg +cat_purr1.ogg +cat_purr2.ogg +cat_purr3.ogg +cat_purr4.ogg +} - made by sadboysuss, License: CC-BY-SA +oranges_meow.ogg - voiced by orangesnz, License: CC0 diff --git a/sound/creatures/cat/cat_meow1.ogg b/sound/creatures/cat/cat_meow1.ogg new file mode 100644 index 00000000000..a1889e18fbf Binary files /dev/null and b/sound/creatures/cat/cat_meow1.ogg differ diff --git a/sound/creatures/cat/cat_meow2.ogg b/sound/creatures/cat/cat_meow2.ogg new file mode 100644 index 00000000000..919a071a871 Binary files /dev/null and b/sound/creatures/cat/cat_meow2.ogg differ diff --git a/sound/creatures/cat/cat_meow3.ogg b/sound/creatures/cat/cat_meow3.ogg new file mode 100644 index 00000000000..dc811610996 Binary files /dev/null and b/sound/creatures/cat/cat_meow3.ogg differ diff --git a/sound/creatures/cat/cat_purr1.ogg b/sound/creatures/cat/cat_purr1.ogg new file mode 100644 index 00000000000..c90d78282bf Binary files /dev/null and b/sound/creatures/cat/cat_purr1.ogg differ diff --git a/sound/creatures/cat/cat_purr2.ogg b/sound/creatures/cat/cat_purr2.ogg new file mode 100644 index 00000000000..0b4aa509e91 Binary files /dev/null and b/sound/creatures/cat/cat_purr2.ogg differ diff --git a/sound/creatures/cat/cat_purr3.ogg b/sound/creatures/cat/cat_purr3.ogg new file mode 100644 index 00000000000..5a59adea586 Binary files /dev/null and b/sound/creatures/cat/cat_purr3.ogg differ diff --git a/sound/creatures/cat/cat_purr4.ogg b/sound/creatures/cat/cat_purr4.ogg new file mode 100644 index 00000000000..8ad7a053018 Binary files /dev/null and b/sound/creatures/cat/cat_purr4.ogg differ diff --git a/sound/creatures/cat/oranges_meow1.ogg b/sound/creatures/cat/oranges_meow1.ogg new file mode 100644 index 00000000000..19c74143495 Binary files /dev/null and b/sound/creatures/cat/oranges_meow1.ogg differ