* This adds the basic wirework for the gnomes, very unfinished * GNOMES ARE DONE EXCEPT FOR GLUE WOOO * removes gnome id, fixes ai and punch sounds, comments out the code for glue to take fuel * changed sounds to non meme versions * HAT NOW GIVES THE GNOME ACCENT TOO * fixes a typo with Unclippable being Unclipable * removed cuffable component (iforgotaboutit) * added unrevivable to gnomes so defibs wont try (it was immpossible anyways but this is better) * removes scrap code i put in the repair system * remove the carrot mutation code i made (its bad) clean up some things in the repairable system * changes accent system from rplacging g to replacing no * Fix the conflict (plz work) * adds another comment bleh bleh im trying to fix things * PAIN.jpeg * work plz? * FIX FOR REAL * camel case mayhaps? * adds unfinished glue use code (you can still see lit or not lit when held >:/ ) * temporary fix * add: GNOMES REVAMPED * fix: fix accent, sounds and add spawners * add: gnome seeds to seed vendor --------- Co-authored-by: BITTERLYNX <gagestemmerman@gmail.com>
53 lines
2.3 KiB
C#
53 lines
2.3 KiB
C#
using Content.Server.Speech.Components;
|
||
using System.Text.RegularExpressions;
|
||
|
||
namespace Content.Server.Speech.EntitySystems;
|
||
|
||
/// <summary>
|
||
/// System that Gnomes the Gnomes talking
|
||
/// </summary>
|
||
public sealed class GnomeAccentSystem : EntitySystem
|
||
{
|
||
[Dependency] private readonly ReplacementAccentSystem _replacement = default!;
|
||
|
||
public override void Initialize()
|
||
{
|
||
base.Initialize();
|
||
|
||
SubscribeLocalEvent<GnomeAccentComponent, AccentGetEvent>(OnAccentGet);
|
||
}
|
||
public string Accentuate(string message, GnomeAccentComponent component)
|
||
{
|
||
var msg = message;
|
||
|
||
msg = _replacement.ApplyReplacements(msg, "gnome");
|
||
|
||
// Пиздец, а не код
|
||
|
||
msg = Regex.Replace(msg, @"(?<!\w)\bне", "ГНЕМ", RegexOptions.IgnoreCase);
|
||
msg = Regex.Replace(msg, @"(?<!\w)\bнет", "ГНЕМТ", RegexOptions.IgnoreCase);
|
||
|
||
msg = Regex.Replace(msg, @"(?<!\w)\bнахуй", "ГНАМХУЙ", RegexOptions.IgnoreCase);
|
||
msg = Regex.Replace(msg, @"(?<!\w)\bпидоры", "ГНОМЕРЫ", RegexOptions.IgnoreCase);
|
||
msg = Regex.Replace(msg, @"(?<!\w)\bхуесос", "ГНОХУСОМ", RegexOptions.IgnoreCase);
|
||
msg = Regex.Replace(msg, @"(?<!\w)\bебал", "ГНОМИЛ", RegexOptions.IgnoreCase);
|
||
msg = Regex.Replace(msg, @"(?<!\w)\bзаебал", "ЗАГНОМИЛ", RegexOptions.IgnoreCase);
|
||
msg = Regex.Replace(msg, @"(?<!\w)\bубил", "УГНОМИЛ", RegexOptions.IgnoreCase);
|
||
msg = Regex.Replace(msg, @"(?<!\w)\bубит", "УГНОМЛЕН", RegexOptions.IgnoreCase);
|
||
msg = Regex.Replace(msg, @"(?<!\w)\bебнул", "УГНОМЛЕН", RegexOptions.IgnoreCase);
|
||
msg = Regex.Replace(msg, @"(?<!\w)\bстрелял", "СТРЕГНОМИЛ", RegexOptions.IgnoreCase);
|
||
msg = Regex.Replace(msg, @"(?<!\w)\bзаколол", "СГНОМИЛ", RegexOptions.IgnoreCase);
|
||
|
||
msg = Regex.Replace(msg, @"(?<!\w)\bмой", "муй", RegexOptions.None);
|
||
msg = Regex.Replace(msg, @"(?<!\w)\bдруг", "бро", RegexOptions.None);
|
||
msg = Regex.Replace(msg, @"(?<!\w)\bдрузья", "друганы", RegexOptions.None);
|
||
return msg;
|
||
}
|
||
|
||
|
||
private void OnAccentGet(EntityUid uid, GnomeAccentComponent component, AccentGetEvent args)
|
||
{
|
||
args.Message = Accentuate(args.Message, component);
|
||
}
|
||
}
|