mirror of
https://github.com/wega-team/ss14-wega.git
synced 2026-02-15 03:31:44 +01:00
* maybeAccentuate * accentuate examine nodes * working prototype * random accentuator * fix SingleAccentuator.cs * french, mumble, slurred * mobster, pirate, stutter * remove examine prediction (for one day) * random accents per examine, not per sentence * Revert "random accents per examine, not per sentence" This reverts commit 0dfa644bb760e4b3f760f43db8870f43ea75e64d. * crew manifest * tweak examine reaccentuation chance * alert level announcement * event centcom announcements * tweak accent system signatures * nuke annoucement, tweak manifest chance * accentuation rarer and a bit more messed up * examine tooltips * more centcom announcements * reformat * sophisticated reformatting * less * tweak --------- Co-authored-by: Milon <milonpl.git@proton.me>
31 lines
805 B
C#
31 lines
805 B
C#
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);
|
|
}
|
|
|
|
private string Accentuate(string message, MumbleAccentComponent _)
|
|
{
|
|
return Accentuate(message);
|
|
}
|
|
|
|
public string Accentuate(string message)
|
|
{
|
|
return _replacement.ApplyReplacements(message, "mumble");
|
|
}
|
|
|
|
private void OnAccentGet(EntityUid uid, MumbleAccentComponent component, AccentGetEvent args)
|
|
{
|
|
args.Message = Accentuate(args.Message, component);
|
|
}
|
|
}
|