diff --git a/Content.Server/SS220/TouretteSyndrome/TouretteAccentComponent.cs b/Content.Server/SS220/TouretteSyndrome/TouretteAccentComponent.cs new file mode 100644 index 00000000000000..a99f033d9c93d4 --- /dev/null +++ b/Content.Server/SS220/TouretteSyndrome/TouretteAccentComponent.cs @@ -0,0 +1,11 @@ +// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Content.Server.Speech.EntitySystems; +namespace Content.Server.Speech.Components; + +[RegisterComponent] +[Access(typeof(TouretteAccentSystem))] +public sealed partial class TouretteAccentComponent : Component +{ + [ViewVariables(VVAccess.ReadWrite)] public float SwearChance; + protected internal List TouretteWords; +} diff --git a/Content.Server/SS220/TouretteSyndrome/TouretteAccentSystem.cs b/Content.Server/SS220/TouretteSyndrome/TouretteAccentSystem.cs new file mode 100644 index 00000000000000..cd275fa69c46db --- /dev/null +++ b/Content.Server/SS220/TouretteSyndrome/TouretteAccentSystem.cs @@ -0,0 +1,61 @@ +using Content.Server.Speech.Components; +using Robust.Shared.Audio; +using Robust.Shared.Prototypes; +using Robust.Shared.Random; +using System.Diagnostics; +using System.Text.RegularExpressions; +using System.Linq; +using FastAccessors; + +namespace Content.Server.Speech.EntitySystems; + +// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +public sealed class TouretteAccentSystem : EntitySystem +{ + [Dependency] private readonly IPrototypeManager _proto = default!; + [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly ReplacementAccentSystem _replacement = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnAccentGet); + SubscribeLocalEvent(OnTouretteStartup); + } + + + private void OnTouretteStartup(EntityUid uid, TouretteAccentComponent component, ComponentStartup args) + { + component.SwearChance = _random.NextFloat(0f, 0.7f); + + if (component.SwearChance >= 0.6f) + component.SwearChance = 0f; + + var en = _proto.EnumeratePrototypes(); + component.TouretteWords = en.ToArray()[_random.Next(0, en.Count() - 1)].Replics; + } + + // converts left word when typed into the right word. For example typing you becomes ye. + private string Accentuate(string message, TouretteAccentComponent component) + { + var msg = message; + + if (!_random.Prob(component.SwearChance)) + return msg; + + if (string.IsNullOrEmpty(msg)) + return msg; + + var pick = _random.Pick(component.TouretteWords); + msg = msg[0].ToString().ToLower() + msg.Remove(0, 1); + msg = Loc.GetString(pick) + ", " + msg; + + return msg; + } + + private void OnAccentGet(EntityUid uid, TouretteAccentComponent component, AccentGetEvent args) + { + args.Message = Accentuate(args.Message, component); + } +} diff --git a/Content.Shared/SS220/TouretteSyndrome/TouretteCollectionPrototype.cs b/Content.Shared/SS220/TouretteSyndrome/TouretteCollectionPrototype.cs new file mode 100644 index 00000000000000..b2d3c03926684c --- /dev/null +++ b/Content.Shared/SS220/TouretteSyndrome/TouretteCollectionPrototype.cs @@ -0,0 +1,16 @@ +// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Robust.Shared.Prototypes; +using Robust.Shared.Serialization.Manager.Attributes; +using Robust.Shared.Utility; +using Robust.Shared.ViewVariables; +using System.Collections.Generic; + +namespace Robust.Shared.Audio; + +[Prototype("touretteCollection")] +public sealed class TouretteCollectionPrototype : IPrototype +{ + [ViewVariables, IdDataField] public string ID { get; private set; } = default!; + [DataField("replics")] + public List Replics { get; private set; } = new(); +} diff --git a/Resources/Locale/ru-RU/ss220/accent/TouretteAccent.ftl b/Resources/Locale/ru-RU/ss220/accent/TouretteAccent.ftl new file mode 100644 index 00000000000000..cf1b77e8aa7c2c --- /dev/null +++ b/Resources/Locale/ru-RU/ss220/accent/TouretteAccent.ftl @@ -0,0 +1,49 @@ +accent-tourette-prefix-1-1 = Скуик +accent-tourette-prefix-1-2 = Пиип +accent-tourette-prefix-1-3 = Тц-тц +accent-tourette-prefix-1-4 = Мяу +accent-tourette-prefix-1-5 = Скуик скуик +accent-tourette-prefix-1-6 = Скуик-скуик + +accent-tourette-prefix-2-1 = Эй +accent-tourette-prefix-2-2 = Пупупу +accent-tourette-prefix-2-3 = Да +accent-tourette-prefix-2-4 = Нет +accent-tourette-prefix-2-5 = А +accent-tourette-prefix-2-6 = Бе +accent-tourette-prefix-2-7 = Буэ +accent-tourette-prefix-2-8 = Брррр + +accent-tourette-prefix-3-1 = Блять +accent-tourette-prefix-3-2 = Сука +accent-tourette-prefix-3-3 = Иду нахуй +accent-tourette-prefix-3-4 = Буэ +accent-tourette-prefix-3-5 = Срань +accent-tourette-prefix-3-6 = Нахуй +accent-tourette-prefix-3-7 = Хуй + +accent-tourette-prefix-4-1 = Пошел ты +accent-tourette-prefix-4-2 = Чертила +accent-tourette-prefix-4-3 = Блять +accent-tourette-prefix-4-4 = Еблан +accent-tourette-prefix-4-5 = Блядь +accent-tourette-prefix-4-6 = Срань +accent-tourette-prefix-4-7 = Сука + +accent-tourette-prefix-5-1 = Скуик +accent-tourette-prefix-5-2 = Мррр +accent-tourette-prefix-5-3 = Мур +accent-tourette-prefix-5-4 = Мяу +accent-tourette-prefix-5-5 = Пхихи +accent-tourette-prefix-5-6 = Скуик скуик +accent-tourette-prefix-5-7 = Хихик +accent-tourette-prefix-5-8 = Кхихи + +accent-tourette-prefix-6-1 = Да +accent-tourette-prefix-6-2 = Нет +accent-tourette-prefix-6-3 = Хуй +accent-tourette-prefix-6-4 = Да-да +accent-tourette-prefix-6-5 = Нет-нет +accent-tourette-prefix-6-6 = Угу +accent-tourette-prefix-6-7 = Ага +accent-tourette-prefix-6-8 = Эй \ No newline at end of file diff --git a/Resources/Locale/ru-RU/ss220/traits.ftl b/Resources/Locale/ru-RU/ss220/traits.ftl new file mode 100644 index 00000000000000..edb96be108c25a --- /dev/null +++ b/Resources/Locale/ru-RU/ss220/traits.ftl @@ -0,0 +1,2 @@ +trait-tourette-name = Синдром Туретта +trait-tourette-desc = Иногда вы непроизвольно издаете какие-то звуки или нецензурную брань. Иногда. И не факт, что вы будете именно ругаться. diff --git a/Resources/PhotocopierForms/FormIndex.yml b/Resources/PhotocopierForms/FormIndex.yml index 4b6d1c6d87f484..83552abdbef3f7 100644 --- a/Resources/PhotocopierForms/FormIndex.yml +++ b/Resources/PhotocopierForms/FormIndex.yml @@ -95,6 +95,7 @@ - /PhotocopierForms/nanotrasen_station/medical/med_rcp.xml - /PhotocopierForms/nanotrasen_station/medical/med_rep_death.xml - /PhotocopierForms/nanotrasen_station/medical/med_rep_psych.xml + - /PhotocopierForms/nanotrasen_station/medical/med_rep_psych_tourette.xml - /PhotocopierForms/nanotrasen_station/medical/med_sitrep.xml - Id: engineering Name: Инженерный отдел diff --git a/Resources/PhotocopierForms/nanotrasen_station/medical/med_rep_psych_tourette.xml b/Resources/PhotocopierForms/nanotrasen_station/medical/med_rep_psych_tourette.xml new file mode 100644 index 00000000000000..cd8f3c6b8117bd --- /dev/null +++ b/Resources/PhotocopierForms/nanotrasen_station/medical/med_rep_psych_tourette.xml @@ -0,0 +1,20 @@ + +
+ med_rep_psych_tourette + PaperNtFormMed + форма НТ-МЕД-ТРТТ + Справка о синдроме Туретта + +
\ No newline at end of file diff --git a/Resources/Prototypes/SS220/TouretteCollection/aggressive.yml b/Resources/Prototypes/SS220/TouretteCollection/aggressive.yml new file mode 100644 index 00000000000000..7f74a2e97dd6c6 --- /dev/null +++ b/Resources/Prototypes/SS220/TouretteCollection/aggressive.yml @@ -0,0 +1,11 @@ +# © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +- type: touretteCollection + id: aggressive + replics: + - accent-tourette-prefix-4-1 + - accent-tourette-prefix-4-2 + - accent-tourette-prefix-4-3 + - accent-tourette-prefix-4-4 + - accent-tourette-prefix-4-5 + - accent-tourette-prefix-4-6 + - accent-tourette-prefix-4-7 diff --git a/Resources/Prototypes/SS220/TouretteCollection/confusing.yml b/Resources/Prototypes/SS220/TouretteCollection/confusing.yml new file mode 100644 index 00000000000000..97b6764dee3bcd --- /dev/null +++ b/Resources/Prototypes/SS220/TouretteCollection/confusing.yml @@ -0,0 +1,12 @@ +# © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +- type: touretteCollection + id: confusing + replics: + - accent-tourette-prefix-6-1 + - accent-tourette-prefix-6-2 + - accent-tourette-prefix-6-3 + - accent-tourette-prefix-6-4 + - accent-tourette-prefix-6-5 + - accent-tourette-prefix-6-6 + - accent-tourette-prefix-6-7 + - accent-tourette-prefix-6-8 diff --git a/Resources/Prototypes/SS220/TouretteCollection/cute.yml b/Resources/Prototypes/SS220/TouretteCollection/cute.yml new file mode 100644 index 00000000000000..5cdc1ad406dcb6 --- /dev/null +++ b/Resources/Prototypes/SS220/TouretteCollection/cute.yml @@ -0,0 +1,12 @@ +# © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +- type: touretteCollection + id: cute + replics: + - accent-tourette-prefix-5-1 + - accent-tourette-prefix-5-2 + - accent-tourette-prefix-5-3 + - accent-tourette-prefix-5-4 + - accent-tourette-prefix-5-5 + - accent-tourette-prefix-5-6 + - accent-tourette-prefix-5-7 + - accent-tourette-prefix-5-8 diff --git a/Resources/Prototypes/SS220/TouretteCollection/second.yml b/Resources/Prototypes/SS220/TouretteCollection/second.yml new file mode 100644 index 00000000000000..b66ede36253ee1 --- /dev/null +++ b/Resources/Prototypes/SS220/TouretteCollection/second.yml @@ -0,0 +1,12 @@ +# © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +- type: touretteCollection + id: Second + replics: + - accent-tourette-prefix-2-1 + - accent-tourette-prefix-2-2 + - accent-tourette-prefix-2-3 + - accent-tourette-prefix-2-4 + - accent-tourette-prefix-2-5 + - accent-tourette-prefix-2-6 + - accent-tourette-prefix-2-7 + - accent-tourette-prefix-2-8 \ No newline at end of file diff --git a/Resources/Prototypes/SS220/TouretteCollection/squeaks.yml b/Resources/Prototypes/SS220/TouretteCollection/squeaks.yml new file mode 100644 index 00000000000000..4f1ffc4bfabfab --- /dev/null +++ b/Resources/Prototypes/SS220/TouretteCollection/squeaks.yml @@ -0,0 +1,10 @@ +# © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +- type: touretteCollection + id: Squeaks + replics: + - accent-tourette-prefix-1-1 + - accent-tourette-prefix-1-2 + - accent-tourette-prefix-1-3 + - accent-tourette-prefix-1-4 + - accent-tourette-prefix-1-5 + - accent-tourette-prefix-1-6 diff --git a/Resources/Prototypes/SS220/TouretteCollection/swearing.yml b/Resources/Prototypes/SS220/TouretteCollection/swearing.yml new file mode 100644 index 00000000000000..4bb2a1a1d1ee8c --- /dev/null +++ b/Resources/Prototypes/SS220/TouretteCollection/swearing.yml @@ -0,0 +1,11 @@ +# © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +- type: touretteCollection + id: Swearing + replics: + - accent-tourette-prefix-3-1 + - accent-tourette-prefix-3-2 + - accent-tourette-prefix-3-3 + - accent-tourette-prefix-3-4 + - accent-tourette-prefix-3-5 + - accent-tourette-prefix-3-6 + - accent-tourette-prefix-3-7 \ No newline at end of file diff --git a/Resources/Prototypes/SS220/tourette_trait.yml b/Resources/Prototypes/SS220/tourette_trait.yml new file mode 100644 index 00000000000000..190087e439d354 --- /dev/null +++ b/Resources/Prototypes/SS220/tourette_trait.yml @@ -0,0 +1,6 @@ +- type: trait + id: TouretteSyndrome + name: trait-tourette-name + description: trait-tourette-desc + components: + - type: TouretteAccent