Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix muzzle accent #34419

Merged
merged 3 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Content.Server/Speech/Components/MumbleAccentComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Content.Server.Speech.Components;

[RegisterComponent]
public sealed partial class MumbleAccentComponent : Component
{

}
25 changes: 25 additions & 0 deletions Content.Server/Speech/EntitySystems/MumbleAccentSystem.cs
Original file line number Diff line number Diff line change
@@ -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);
}
}
3 changes: 1 addition & 2 deletions Resources/Prototypes/Entities/Clothing/Masks/masks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,7 @@
unequipDelay: 3
- type: IngestionBlocker
- type: AddAccentClothing
accent: ReplacementAccent
replacement: mumble
accent: MumbleAccent
- type: Construction
graph: Muzzle
node: muzzle
Expand Down
Loading