Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Muted status effect + 2 reagent sources of it #8673

Merged
merged 3 commits into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Content.Shared/Alert/AlertType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public enum AlertType : byte
Pulling,
Magboots,
Toxins,
Muted,
VowOfSilence,
VowBroken,
Debug1,
Expand Down
6 changes: 6 additions & 0 deletions Content.Shared/Speech/Muting/MutedComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Content.Shared.Speech.Muting
{
[RegisterComponent]
public sealed class MutedComponent : Component
{}
}
21 changes: 21 additions & 0 deletions Content.Shared/Speech/Muting/MutingSystem.cs
Original file line number Diff line number Diff line change
@@ -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<MutedComponent, SpeakAttemptEvent>(OnSpeakAttempt);
}

private void OnSpeakAttempt(EntityUid uid, MutedComponent component, SpeakAttemptEvent args)
{
_popupSystem.PopupEntity(Loc.GetString("speech-muted"), uid, Filter.Entities(uid));
args.Cancel();
}
}
}
3 changes: 3 additions & 0 deletions Resources/Locale/en-US/reagents/meta/narcotics.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
1 change: 1 addition & 0 deletions Resources/Locale/en-US/speech/speech-effects.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
speech-muted = You can't speak right now!
6 changes: 6 additions & 0 deletions Resources/Prototypes/Alerts/alerts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Entities/Mobs/Species/human.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
- Stutter
- Electrocution
- PressureImmunity
- Muted
- type: DiseaseCarrier
# Other
- type: Inventory
Expand Down
8 changes: 8 additions & 0 deletions Resources/Prototypes/Reagents/Consumable/Drink/alcohol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions Resources/Prototypes/Reagents/narcotics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 14 additions & 1 deletion Resources/Prototypes/Recipes/Reactions/chemicals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
4 changes: 4 additions & 0 deletions Resources/Prototypes/status_effects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@

- type: statusEffect
id: PressureImmunity

- type: statusEffect
id: Muted
alert: Muted