Fix muzzle accent (#34419)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
namespace Content.Server.Speech.Components;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed partial class MumbleAccentComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
25
Content.Server/Speech/EntitySystems/MumbleAccentSystem.cs
Normal file
25
Content.Server/Speech/EntitySystems/MumbleAccentSystem.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Content.Server.Speech.Components;
|
||||
|
||||
namespace Content.Server.Speech.EntitySystems;
|
||||
|
||||
public sealed class MumbleAccentSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly ReplacementAccentSystem _replacement = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<MumbleAccentComponent, AccentGetEvent>(OnAccentGet);
|
||||
}
|
||||
|
||||
public string Accentuate(string message, MumbleAccentComponent component)
|
||||
{
|
||||
return _replacement.ApplyReplacements(message, "mumble");
|
||||
}
|
||||
|
||||
private void OnAccentGet(EntityUid uid, MumbleAccentComponent component, AccentGetEvent args)
|
||||
{
|
||||
args.Message = Accentuate(args.Message, component);
|
||||
}
|
||||
}
|
||||
@@ -319,8 +319,7 @@
|
||||
unequipDelay: 3
|
||||
- type: IngestionBlocker
|
||||
- type: AddAccentClothing
|
||||
accent: ReplacementAccent
|
||||
replacement: mumble
|
||||
accent: MumbleAccent
|
||||
- type: Construction
|
||||
graph: Muzzle
|
||||
node: muzzle
|
||||
|
||||
Reference in New Issue
Block a user