diff --git a/Content.Server/Speech/Components/BleatingAccentComponent.cs b/Content.Server/Speech/Components/BleatingAccentComponent.cs new file mode 100644 index 0000000000..484235ab90 --- /dev/null +++ b/Content.Server/Speech/Components/BleatingAccentComponent.cs @@ -0,0 +1,7 @@ +namespace Content.Server.Speech.Components; + +/// +/// Makes this entity speak like a sheep or a goat in all chat messages it sends. +/// +[RegisterComponent] +public sealed partial class BleatingAccentComponent : Component { } diff --git a/Content.Server/Speech/EntitySystems/BleatingAccentSystem.cs b/Content.Server/Speech/EntitySystems/BleatingAccentSystem.cs new file mode 100644 index 0000000000..903377477e --- /dev/null +++ b/Content.Server/Speech/EntitySystems/BleatingAccentSystem.cs @@ -0,0 +1,28 @@ +using System.Text.RegularExpressions; +using Content.Server.Speech.Components; + +namespace Content.Server.Speech.EntitySystems; + +public sealed partial class BleatingAccentSystem : EntitySystem +{ + private static readonly Regex BleatRegex = new("([mbdlpwhrkcnytfo])([aiu])", RegexOptions.IgnoreCase); + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnAccentGet); + } + + private void OnAccentGet(Entity entity, ref AccentGetEvent args) + { + args.Message = Accentuate(args.Message); + } + + public static string Accentuate(string message) + { + // Repeats the vowel in certain consonant-vowel pairs + // So you taaaalk liiiike thiiiis + return BleatRegex.Replace(message, "$1$2$2$2$2"); + } +} diff --git a/Resources/Audio/Machines/attributions.yml b/Resources/Audio/Machines/attributions.yml index f052539f14..23734965e2 100644 --- a/Resources/Audio/Machines/attributions.yml +++ b/Resources/Audio/Machines/attributions.yml @@ -35,7 +35,7 @@ - files: ["vessel_warning.ogg"] license: "CC-BY-4.0" - copyright: "Created by AUDACITIER (freesound), converted to MONO and .ogg and edited by EmoGarbage404 (github)." + copyright: "Created by AUDACITIER (freesound), converted to MONO and .ogg and edited by EmoGarbage404 (github). Removed click at beginning/end with fade in/out (Pancake)." source: "https://freesound.org/people/AUDACITIER/sounds/629196/" - files: ["quickbeep.ogg"] diff --git a/Resources/Audio/Machines/vessel_warning.ogg b/Resources/Audio/Machines/vessel_warning.ogg index 966c80eae6..4385eb10e4 100644 Binary files a/Resources/Audio/Machines/vessel_warning.ogg and b/Resources/Audio/Machines/vessel_warning.ogg differ diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index e8b2bdfd64..2d0f28d80f 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -1,11 +1,4 @@ Entries: -- author: Fildrance - changes: - - message: random uplink discounts for traitors - type: Add - id: 7287 - time: '2024-09-05T12:12:39.0000000+00:00' - url: https://github.com/space-wizards/space-station-14/pull/26297 - author: ScarKy0 changes: - message: AI Actions now work. @@ -3932,3 +3925,10 @@ id: 7786 time: '2025-01-07T17:45:03.0000000+00:00' url: https://github.com/space-wizards/space-station-14/pull/34265 +- author: Tayrtahn + changes: + - message: Sentient goats now have a bleating effect when speaking. + type: Add + id: 7787 + time: '2025-01-08T01:00:20.0000000+00:00' + url: https://github.com/space-wizards/space-station-14/pull/34273 diff --git a/Resources/Locale/en-US/_strings/chat/managers/chat-manager.ftl b/Resources/Locale/en-US/_strings/chat/managers/chat-manager.ftl index 59b927742b..c3d35c9739 100644 --- a/Resources/Locale/en-US/_strings/chat/managers/chat-manager.ftl +++ b/Resources/Locale/en-US/_strings/chat/managers/chat-manager.ftl @@ -118,6 +118,11 @@ chat-speech-verb-canine-1 = barks chat-speech-verb-canine-2 = woofs chat-speech-verb-canine-3 = howls +chat-speech-verb-name-goat = Goat +chat-speech-verb-goat-1 = bleats +chat-speech-verb-goat-2 = grunts +chat-speech-verb-goat-3 = cries + chat-speech-verb-name-small-mob = Mouse chat-speech-verb-small-mob-1 = squeaks chat-speech-verb-small-mob-2 = pieps diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index dff777ef94..5e0ea22c17 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -1001,6 +1001,15 @@ - type: Grammar attributes: gender: female # Here because of UdderComponent + - type: Speech + speechSounds: Goat + speechVerb: Goat + - type: Vocal + sounds: + Female: Goat + Male: Goat + Unsexed: Goat + - type: BleatingAccent - type: InteractionPopup successChance: 0.2 interactSuccessString: petting-success-goat diff --git a/Resources/Prototypes/Voice/speech_emote_sounds.yml b/Resources/Prototypes/Voice/speech_emote_sounds.yml index e908ca5ccb..ff84cb128a 100644 --- a/Resources/Prototypes/Voice/speech_emote_sounds.yml +++ b/Resources/Prototypes/Voice/speech_emote_sounds.yml @@ -529,3 +529,10 @@ path: /Audio/Animals/parrot_raught.ogg params: variation: 0.125 + +- type: emoteSounds + id: Goat + sound: + path: /Audio/Animals/goat_bah.ogg + params: + variation: 0.125 diff --git a/Resources/Prototypes/Voice/speech_sounds.yml b/Resources/Prototypes/Voice/speech_sounds.yml index bc3cffb359..c1ad6b9e40 100644 --- a/Resources/Prototypes/Voice/speech_sounds.yml +++ b/Resources/Prototypes/Voice/speech_sounds.yml @@ -159,3 +159,12 @@ path: /Audio/Animals/chicken_cluck_happy.ogg exclaimSound: path: /Audio/Animals/chicken_cluck_happy.ogg + +- type: speechSounds + id: Goat + saySound: + path: /Audio/Animals/goat_bah.ogg + askSound: + path: /Audio/Animals/goat_bah.ogg + exclaimSound: + path: /Audio/Animals/goat_bah.ogg diff --git a/Resources/Prototypes/Voice/speech_verbs.yml b/Resources/Prototypes/Voice/speech_verbs.yml index 9879cefb75..f8202847fd 100644 --- a/Resources/Prototypes/Voice/speech_verbs.yml +++ b/Resources/Prototypes/Voice/speech_verbs.yml @@ -110,6 +110,14 @@ - chat-speech-verb-canine-2 - chat-speech-verb-canine-3 +- type: speechVerb + id: Goat + name: chat-speech-verb-name-goat + speechVerbStrings: + - chat-speech-verb-goat-1 + - chat-speech-verb-goat-2 + - chat-speech-verb-goat-3 + - type: speechVerb id: LargeMob name: chat-speech-verb-name-large-mob