forked from space-wizards/space-station-14
-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* А вы видели ту серию Южного Парка про синдром туретта? Хорошая серия * Непофикшенное пофикшено * Update TouretteAccentSystem.cs * Update TouretteAccentSystem.cs * Update confusing.yml
- Loading branch information
1 parent
97a9b5b
commit 6d112f7
Showing
14 changed files
with
234 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
Content.Server/SS220/TouretteSyndrome/TouretteAccentComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<string> TouretteWords; | ||
} |
61 changes: 61 additions & 0 deletions
61
Content.Server/SS220/TouretteSyndrome/TouretteAccentSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<TouretteAccentComponent, AccentGetEvent>(OnAccentGet); | ||
SubscribeLocalEvent<TouretteAccentComponent, ComponentStartup>(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<TouretteCollectionPrototype>(); | ||
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); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
Content.Shared/SS220/TouretteSyndrome/TouretteCollectionPrototype.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<string> Replics { get; private set; } = new(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 = Эй |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
trait-tourette-name = Синдром Туретта | ||
trait-tourette-desc = Иногда вы непроизвольно издаете какие-то звуки или нецензурную брань. Иногда. И не факт, что вы будете именно ругаться. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
Resources/PhotocopierForms/nanotrasen_station/medical/med_rep_psych_tourette.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<Form> | ||
<FormId>med_rep_psych_tourette</FormId> | ||
<PrototypeId>PaperNtFormMed</PrototypeId> | ||
<EntityName>форма НТ-МЕД-ТРТТ</EntityName> | ||
<PhotocopierTitle>Справка о синдроме Туретта</PhotocopierTitle> | ||
<Content><![CDATA[[bold]Форма НТ-МЕД-ТРТТ[/bold] | ||
[head=2]Справка о синдроме Туретта[/head] | ||
[italic]Дата: ДЕНЬ/МЕСЯЦ/ГОД[/italic] | ||
[bold]Психолог:[/bold] (ПОЛНОЕ ИМЯ ПСИХОЛОГА) | ||
[bold]Полное имя и должность пациента:[/bold] | ||
[bold]Состояние синдрома:[/bold] | ||
(Стадия развития, степень выраженности, навязчивость) | ||
[bold]Проявляющиеся тики:[/bold] | ||
(Описание тиков) | ||
[italic]Место для печатей - Психолог[/italic]]]></Content> | ||
</Form> |
11 changes: 11 additions & 0 deletions
11
Resources/Prototypes/SS220/TouretteCollection/aggressive.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
12 changes: 12 additions & 0 deletions
12
Resources/Prototypes/SS220/TouretteCollection/confusing.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
11 changes: 11 additions & 0 deletions
11
Resources/Prototypes/SS220/TouretteCollection/swearing.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- type: trait | ||
id: TouretteSyndrome | ||
name: trait-tourette-name | ||
description: trait-tourette-desc | ||
components: | ||
- type: TouretteAccent |