From e2bcf619d19359defaaf6468cd30ef2a9a03a691 Mon Sep 17 00:00:00 2001 From: Pancake Date: Thu, 23 Dec 2021 05:30:33 -0800 Subject: [PATCH] Mouse Accent Fix (#5876) --- .../Speech/Components/MouseAccentComponent.cs | 10 ------ .../Speech/EntitySystems/MouseAccentSystem.cs | 32 ------------------- .../Prototypes/Entities/Mobs/NPCs/animals.yml | 4 ++- Resources/Prototypes/accents.yml | 8 +++++ 4 files changed, 11 insertions(+), 43 deletions(-) delete mode 100644 Content.Server/Speech/Components/MouseAccentComponent.cs delete mode 100644 Content.Server/Speech/EntitySystems/MouseAccentSystem.cs diff --git a/Content.Server/Speech/Components/MouseAccentComponent.cs b/Content.Server/Speech/Components/MouseAccentComponent.cs deleted file mode 100644 index a22719a301..0000000000 --- a/Content.Server/Speech/Components/MouseAccentComponent.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Robust.Shared.GameObjects; - -namespace Content.Server.Speech.Components -{ - [RegisterComponent] - public class MouseAccentComponent : Component - { - public override string Name => "MouseAccent"; - } -} diff --git a/Content.Server/Speech/EntitySystems/MouseAccentSystem.cs b/Content.Server/Speech/EntitySystems/MouseAccentSystem.cs deleted file mode 100644 index 9e25ef7982..0000000000 --- a/Content.Server/Speech/EntitySystems/MouseAccentSystem.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Collections.Generic; -using Content.Server.Speech.Components; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; -using Robust.Shared.Random; - -namespace Content.Server.Speech.EntitySystems -{ - // TODO: Code in-game languages and make this a language - public class MouseAccentSystem : EntitySystem - { - [Dependency] private readonly IRobustRandom _random = default!; - - private static readonly IReadOnlyList Squeek = new List{ "Squeak!", "Piep!", "Chuu!" }; - - public override void Initialize() - { - SubscribeLocalEvent(OnAccent); - } - - public string Accentuate(string message) - { - // TODO: Maybe add more than one squeek when there are more words? - return _random.Pick(Squeek); - } - - private void OnAccent(EntityUid uid, MouseAccentComponent component, AccentGetEvent args) - { - args.Message = Accentuate(args.Message); - } - } -} diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml index 606a04942c..419c307974 100644 --- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml +++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml @@ -432,7 +432,9 @@ reagents: - ReagentId: Nutriment Quantity: 5 - - type: MouseAccent + - type: ReplacementAccent + accent: mouse + - type: entity parent: MobMouse diff --git a/Resources/Prototypes/accents.yml b/Resources/Prototypes/accents.yml index 517225897a..9a95284724 100644 --- a/Resources/Prototypes/accents.yml +++ b/Resources/Prototypes/accents.yml @@ -15,3 +15,11 @@ - Woof! - Arf. - Grrr. + +- type: accent + id: mouse + words: + - Squeak! + - Piep! + - Chuu! + - Eeee!