diff --git a/Content.Shared/Alert/AlertType.cs b/Content.Shared/Alert/AlertType.cs index 35409a2548..2a42b20d6f 100644 --- a/Content.Shared/Alert/AlertType.cs +++ b/Content.Shared/Alert/AlertType.cs @@ -32,6 +32,7 @@ Pulling, Magboots, Toxins, + Muted, VowOfSilence, VowBroken, Debug1, diff --git a/Content.Shared/Speech/Muting/MutedComponent.cs b/Content.Shared/Speech/Muting/MutedComponent.cs new file mode 100644 index 0000000000..ff03be18a8 --- /dev/null +++ b/Content.Shared/Speech/Muting/MutedComponent.cs @@ -0,0 +1,6 @@ +namespace Content.Shared.Speech.Muting +{ + [RegisterComponent] + public sealed class MutedComponent : Component + {} +} diff --git a/Content.Shared/Speech/Muting/MutingSystem.cs b/Content.Shared/Speech/Muting/MutingSystem.cs new file mode 100644 index 0000000000..0f3e89e91a --- /dev/null +++ b/Content.Shared/Speech/Muting/MutingSystem.cs @@ -0,0 +1,21 @@ +using Content.Shared.Popups; +using Robust.Shared.Player; + +namespace Content.Shared.Speech.Muting +{ + public sealed class MutingSystem : EntitySystem + { + [Dependency] private readonly SharedPopupSystem _popupSystem = default!; + public override void Initialize() + { + base.Initialize(); + SubscribeLocalEvent(OnSpeakAttempt); + } + + private void OnSpeakAttempt(EntityUid uid, MutedComponent component, SpeakAttemptEvent args) + { + _popupSystem.PopupEntity(Loc.GetString("speech-muted"), uid, Filter.Entities(uid)); + args.Cancel(); + } + } +} diff --git a/Resources/Locale/en-US/reagents/meta/narcotics.ftl b/Resources/Locale/en-US/reagents/meta/narcotics.ftl index 13e39dce6f..8d913894cc 100644 --- a/Resources/Locale/en-US/reagents/meta/narcotics.ftl +++ b/Resources/Locale/en-US/reagents/meta/narcotics.ftl @@ -21,3 +21,6 @@ reagent-desc-space-drugs = An illegal compound which induces a number of effects reagent-name-nocturine = nocturine reagent-desc-nocturine = Makes you feel very tired and unable to stand up. Basically, it's bone hurting juice. + +reagent-name-mute-toxin = mute toxin +reagent-desc-mute-toxin = Makes you unable to talk while metabolizing. diff --git a/Resources/Locale/en-US/speech/speech-effects.ftl b/Resources/Locale/en-US/speech/speech-effects.ftl new file mode 100644 index 0000000000..9f5ae07051 --- /dev/null +++ b/Resources/Locale/en-US/speech/speech-effects.ftl @@ -0,0 +1 @@ +speech-muted = You can't speak right now! diff --git a/Resources/Prototypes/Alerts/alerts.yml b/Resources/Prototypes/Alerts/alerts.yml index f4668347ed..064dd91717 100644 --- a/Resources/Prototypes/Alerts/alerts.yml +++ b/Resources/Prototypes/Alerts/alerts.yml @@ -191,6 +191,12 @@ name: "[color=red]Parched[/color]" description: You're severely thirsty. The thirst makes moving around a chore. +- type: alert + id: Muted + icon: /Textures/Interface/Alerts/Abilities/silenced.png + name: Muted + description: You have lost the ability to speak. + - type: alert id: VowOfSilence icon: /Textures/Interface/Alerts/Abilities/silenced.png diff --git a/Resources/Prototypes/Entities/Mobs/Species/human.yml b/Resources/Prototypes/Entities/Mobs/Species/human.yml index 55b248480c..4f3129b534 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/human.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/human.yml @@ -82,6 +82,7 @@ - Stutter - Electrocution - PressureImmunity + - Muted - type: DiseaseCarrier # Other - type: Inventory diff --git a/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml b/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml index 4de2436549..81f0a563b8 100644 --- a/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml +++ b/Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml @@ -912,6 +912,14 @@ physicalDesc: reagent-physical-desc-strong-smelling color: "#004666" spritePath: silencerglass.rsi + metabolisms: + Drink: + effects: + - !type:GenericStatusEffect + key: Muted + component: Muted + - !type:SatiateThirst + factor: 2 - type: reagent id: Singulo diff --git a/Resources/Prototypes/Reagents/narcotics.yml b/Resources/Prototypes/Reagents/narcotics.yml index b740fed2b3..36eebd2141 100644 --- a/Resources/Prototypes/Reagents/narcotics.yml +++ b/Resources/Prototypes/Reagents/narcotics.yml @@ -152,3 +152,19 @@ key: Stutter time: 1 component: StutteringAccent + +- type: reagent + id: MuteToxin + name: reagent-name-mute-toxin + group: Narcotics + desc: reagent-desc-mute-toxin + physicalDesc: reagent-physical-desc-syrupy + color: "#000000" + boilingPoint: 255.0 + meltingPoint: 36.0 + metabolisms: + Narcotic: + effects: + - !type:GenericStatusEffect + key: Muted + component: Muted diff --git a/Resources/Prototypes/Recipes/Reactions/chemicals.yml b/Resources/Prototypes/Recipes/Reactions/chemicals.yml index c82d956be9..91f23f195b 100644 --- a/Resources/Prototypes/Recipes/Reactions/chemicals.yml +++ b/Resources/Prototypes/Recipes/Reactions/chemicals.yml @@ -91,7 +91,7 @@ - !type:ExplosionReactionEffect explosionType: Default maxIntensity: 1 # at most 15 damage per tile - intensityPerUnit: 0.5 # 50+50 reagent for maximum explosion + intensityPerUnit: 0.5 # 50+50 reagent for maximum explosion intensitySlope: 2 maxTotalIntensity: 25 @@ -287,3 +287,16 @@ amount: 1 products: Ephedrine: 4 + +- type: reaction + id: MuteToxin + impact: Medium + reactants: + Uranium: + amount: 2 + Water: + amount: 1 + Carbon: + amount: 1 + products: + MuteToxin: 2 #Lower yield is intentional diff --git a/Resources/Prototypes/status_effects.yml b/Resources/Prototypes/status_effects.yml index d7acc7601b..9e36c423da 100644 --- a/Resources/Prototypes/status_effects.yml +++ b/Resources/Prototypes/status_effects.yml @@ -27,3 +27,7 @@ - type: statusEffect id: PressureImmunity + +- type: statusEffect + id: Muted + alert: Muted