using Content.Shared.Drunk;
using Content.Shared.StatusEffect;
+using Content.Shared.StatusEffectNew;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Enums;
if (playerEntity == null)
return;
- if (!_entityManager.HasComponent<DrunkComponent>(playerEntity)
- || !_entityManager.TryGetComponent<StatusEffectsComponent>(playerEntity, out var status))
+ var statusSys = _sysMan.GetEntitySystem<Shared.StatusEffectNew.StatusEffectsSystem>();
+ if (!statusSys.TryGetMaxTime<DrunkStatusEffectComponent>(playerEntity.Value, out var status))
return;
- var statusSys = _sysMan.GetEntitySystem<StatusEffectsSystem>();
- if (!statusSys.TryGetTime(playerEntity.Value, SharedDrunkSystem.DrunkKey, out var time, status))
- return;
+ var time = status.Item2;
- var curTime = _timing.CurTime;
- var timeLeft = (float) (time.Value.Item2 - curTime).TotalSeconds;
+ var power = SharedDrunkSystem.MagicNumber;
+ if (time != null)
+ {
+ var curTime = _timing.CurTime;
+ power = (float) (time - curTime).Value.TotalSeconds;
+ }
- CurrentBoozePower += 8f * (0.5f*timeLeft - CurrentBoozePower) * args.DeltaSeconds / (timeLeft+1);
+ CurrentBoozePower += 8f * (power * 0.5f - CurrentBoozePower) * args.DeltaSeconds / (power+1);
}
protected override bool BeforeDraw(in OverlayDrawArgs args)
using Content.Shared.Drunk;
+using Content.Shared.StatusEffectNew;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Player;
{
base.Initialize();
- SubscribeLocalEvent<DrunkComponent, ComponentInit>(OnDrunkInit);
- SubscribeLocalEvent<DrunkComponent, ComponentShutdown>(OnDrunkShutdown);
+ SubscribeLocalEvent<DrunkStatusEffectComponent, StatusEffectAppliedEvent>(OnStatusApplied);
+ SubscribeLocalEvent<DrunkStatusEffectComponent, StatusEffectRemovedEvent>(OnStatusRemoved);
- SubscribeLocalEvent<DrunkComponent, LocalPlayerAttachedEvent>(OnPlayerAttached);
- SubscribeLocalEvent<DrunkComponent, LocalPlayerDetachedEvent>(OnPlayerDetached);
+ SubscribeLocalEvent<DrunkStatusEffectComponent, StatusEffectRelayedEvent<LocalPlayerAttachedEvent>>(OnPlayerAttached);
+ SubscribeLocalEvent<DrunkStatusEffectComponent, StatusEffectRelayedEvent<LocalPlayerDetachedEvent>>(OnPlayerDetached);
_overlay = new();
}
- private void OnPlayerAttached(EntityUid uid, DrunkComponent component, LocalPlayerAttachedEvent args)
+ private void OnStatusApplied(Entity<DrunkStatusEffectComponent> entity, ref StatusEffectAppliedEvent args)
{
- _overlayMan.AddOverlay(_overlay);
+ if (!_overlayMan.HasOverlay<DrunkOverlay>())
+ _overlayMan.AddOverlay(_overlay);
}
- private void OnPlayerDetached(EntityUid uid, DrunkComponent component, LocalPlayerDetachedEvent args)
+ private void OnStatusRemoved(Entity<DrunkStatusEffectComponent> entity, ref StatusEffectRemovedEvent args)
{
+ if (Status.HasEffectComp<DrunkStatusEffectComponent>(args.Target))
+ return;
+
+ if (_player.LocalEntity != args.Target)
+ return;
+
_overlay.CurrentBoozePower = 0;
_overlayMan.RemoveOverlay(_overlay);
}
- private void OnDrunkInit(EntityUid uid, DrunkComponent component, ComponentInit args)
+ private void OnPlayerAttached(Entity<DrunkStatusEffectComponent> entity, ref StatusEffectRelayedEvent<LocalPlayerAttachedEvent> args)
{
- if (_player.LocalEntity == uid)
- _overlayMan.AddOverlay(_overlay);
+ _overlayMan.AddOverlay(_overlay);
}
- private void OnDrunkShutdown(EntityUid uid, DrunkComponent component, ComponentShutdown args)
+ private void OnPlayerDetached(Entity<DrunkStatusEffectComponent> entity, ref StatusEffectRelayedEvent<LocalPlayerDetachedEvent> args)
{
- if (_player.LocalEntity == uid)
- {
- _overlay.CurrentBoozePower = 0;
- _overlayMan.RemoveOverlay(_overlay);
- }
+ _overlay.CurrentBoozePower = 0;
+ _overlayMan.RemoveOverlay(_overlay);
}
}
}
}
- _stuttering.DoStutter(uid, time * StutteringTimeMultiplier, refresh, statusEffects);
+ _stuttering.DoStutter(uid, time * StutteringTimeMultiplier, refresh);
_jittering.DoJitter(uid, time * JitterTimeMultiplier, refresh, JitterAmplitude, JitterFrequency, true, statusEffects);
_popup.PopupEntity(Loc.GetString("electrocuted-component-mob-shocked-popup-player"), uid, uid);
/// <summary>
/// Percentage chance that a stutter will occur if it matches.
/// </summary>
- [DataField("matchRandomProb")]
- [ViewVariables(VVAccess.ReadWrite)]
+ [DataField]
public float MatchRandomProb = 0.8f;
/// <summary>
/// Percentage chance that a stutter occurs f-f-f-f-four times.
/// </summary>
- [DataField("fourRandomProb")]
- [ViewVariables(VVAccess.ReadWrite)]
+ [DataField]
public float FourRandomProb = 0.1f;
/// <summary>
/// Percentage chance that a stutter occurs t-t-t-three times.
/// </summary>
- [DataField("threeRandomProb")]
- [ViewVariables(VVAccess.ReadWrite)]
+ [DataField]
public float ThreeRandomProb = 0.2f;
/// <summary>
/// Percentage chance that a stutter cut off.
/// </summary>
- [DataField("cutRandomProb")]
- [ViewVariables(VVAccess.ReadWrite)]
+ [DataField]
public float CutRandomProb = 0.05f;
}
}
using Content.Shared.Drunk;
using Content.Shared.Speech;
using Content.Shared.Speech.EntitySystems;
-using Content.Shared.StatusEffect;
-using Robust.Shared.Prototypes;
+using Content.Shared.StatusEffectNew;
using Robust.Shared.Random;
using Robust.Shared.Timing;
public sealed class SlurredSystem : SharedSlurredSystem
{
- [Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;
+ [Dependency] private readonly StatusEffectsSystem _status = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly IGameTiming _timing = default!;
- private static readonly ProtoId<StatusEffectPrototype> SlurKey = "SlurredSpeech";
-
public override void Initialize()
{
SubscribeLocalEvent<SlurredAccentComponent, AccentGetEvent>(OnAccent);
- }
-
- public override void DoSlur(EntityUid uid, TimeSpan time, StatusEffectsComponent? status = null)
- {
- if (!Resolve(uid, ref status, false))
- return;
- if (!_statusEffectsSystem.HasStatusEffect(uid, SlurKey, status))
- _statusEffectsSystem.TryAddStatusEffect<SlurredAccentComponent>(uid, SlurKey, time, true, status);
- else
- _statusEffectsSystem.TryAddTime(uid, SlurKey, time, status);
+ SubscribeLocalEvent<SlurredAccentComponent, StatusEffectRelayedEvent<AccentGetEvent>>(OnAccentRelayed);
}
/// <summary>
/// </summary>
private float GetProbabilityScale(EntityUid uid)
{
- if (!_statusEffectsSystem.TryGetTime(uid, SharedDrunkSystem.DrunkKey, out var time))
+ if (!_status.TryGetMaxTime<DrunkStatusEffectComponent>(uid, out var time))
return 0;
- var curTime = _timing.CurTime;
- var timeLeft = (float) (time.Value.Item2 - curTime).TotalSeconds;
- return Math.Clamp((timeLeft - 80) / 1100, 0f, 1f);
+ // This is a magic number. Why this value? No clue it was made 3 years before I refactored this.
+ var magic = SharedDrunkSystem.MagicNumber;
+
+ if (time.Item2 != null)
+ {
+ var curTime = _timing.CurTime;
+ magic = (float) (time.Item2 - curTime).Value.TotalSeconds - 80f;
+ }
+
+ return Math.Clamp(magic / SharedDrunkSystem.MagicNumber, 0f, 1f);
+ }
+
+ private void OnAccent(Entity<SlurredAccentComponent> entity, ref AccentGetEvent args)
+ {
+ GetAccent(entity, ref args);
+ }
+
+ private void OnAccentRelayed(Entity<SlurredAccentComponent> entity, ref StatusEffectRelayedEvent<AccentGetEvent> args)
+ {
+ var ev = args.Args;
+ GetAccent(args.Args.Entity, ref ev);
}
- private void OnAccent(EntityUid uid, SlurredAccentComponent component, AccentGetEvent args)
+ private void GetAccent(EntityUid uid, ref AccentGetEvent args)
{
var scale = GetProbabilityScale(uid);
args.Message = Accentuate(args.Message, scale);
using Content.Server.Speech.Components;
using Content.Shared.Speech;
using Content.Shared.Speech.EntitySystems;
-using Content.Shared.StatusEffect;
+using Content.Shared.StatusEffectNew;
using Robust.Shared.Random;
namespace Content.Server.Speech.EntitySystems
{
public sealed class StutteringSystem : SharedStutteringSystem
{
- [Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;
[Dependency] private readonly IRobustRandom _random = default!;
// Regex of characters to stutter.
public override void Initialize()
{
SubscribeLocalEvent<StutteringAccentComponent, AccentGetEvent>(OnAccent);
+
+ SubscribeLocalEvent<StutteringAccentComponent, StatusEffectRelayedEvent<AccentGetEvent>>(OnAccent);
}
- public override void DoStutter(EntityUid uid, TimeSpan time, bool refresh, StatusEffectsComponent? status = null)
+ public override void DoStutter(EntityUid uid, TimeSpan time, bool refresh)
{
- if (!Resolve(uid, ref status, false))
- return;
+ if (refresh)
+ Status.TryUpdateStatusEffectDuration(uid, Stuttering, time);
+ else
+ Status.TryAddStatusEffectDuration(uid, Stuttering, time);
+ }
+
+ public override void DoRemoveStutterTime(EntityUid uid, TimeSpan timeRemoved)
+ {
+ Status.TryAddTime(uid, Stuttering, -timeRemoved);
+ }
- _statusEffectsSystem.TryAddStatusEffect<StutteringAccentComponent>(uid, StutterKey, time, refresh, status);
+ public override void DoRemoveStutter(EntityUid uid)
+ {
+ Status.TryRemoveStatusEffect(uid, Stuttering);
+ }
+
+ private void OnAccent(Entity<StutteringAccentComponent> entity, ref AccentGetEvent args)
+ {
+ args.Message = Accentuate(args.Message, entity.Comp);
}
- private void OnAccent(EntityUid uid, StutteringAccentComponent component, AccentGetEvent args)
+ private void OnAccent(Entity<StutteringAccentComponent> entity, ref StatusEffectRelayedEvent<AccentGetEvent> args)
{
- args.Message = Accentuate(args.Message, component);
+ args.Args.Message = Accentuate(args.Args.Message, entity.Comp);
}
public string Accentuate(string message, StutteringAccentComponent component)
[ViewVariables]
public Entity<SolutionComponent>? TemporarySolution;
- /// <summary>
- /// Variable that stores the amount of status time added by having a low blood level.
- /// </summary>
- [DataField, AutoNetworkedField]
- public TimeSpan StatusTime;
-
/// <summary>
/// Alert to show when bleeding.
/// </summary>
using Content.Shared.Chemistry.Reaction;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Damage;
-using Content.Shared.Drunk;
using Content.Shared.EntityEffects.Effects;
using Content.Shared.FixedPoint;
using Content.Shared.Fluids;
using Content.Shared.Popups;
using Content.Shared.Random.Helpers;
using Content.Shared.Rejuvenate;
-using Content.Shared.Speech.EntitySystems;
+using Content.Shared.StatusEffectNew;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Containers;
using Robust.Shared.Prototypes;
public abstract class SharedBloodstreamSystem : EntitySystem
{
+ public static readonly EntProtoId Bloodloss = "StatusEffectBloodloss";
+
[Dependency] protected readonly SharedSolutionContainerSystem SolutionContainer = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly SharedPuddleSystem _puddle = default!;
+ [Dependency] private readonly StatusEffectsSystem _status = default!;
[Dependency] private readonly AlertsSystem _alertsSystem = default!;
[Dependency] private readonly MobStateSystem _mobStateSystem = default!;
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
- [Dependency] private readonly SharedDrunkSystem _drunkSystem = default!;
- [Dependency] private readonly SharedStutteringSystem _stutteringSystem = default!;
public override void Initialize()
{
// Apply dizziness as a symptom of bloodloss.
// The effect is applied in a way that it will never be cleared without being healthy.
// Multiplying by 2 is arbitrary but works for this case, it just prevents the time from running out
- _drunkSystem.TryApplyDrunkenness(
- uid,
- (float)bloodstream.AdjustedUpdateInterval.TotalSeconds * 2,
- applySlur: false);
- _stutteringSystem.DoStutter(uid, bloodstream.AdjustedUpdateInterval * 2, refresh: false);
-
- // storing the drunk and stutter time so we can remove it independently from other effects additions
- bloodstream.StatusTime += bloodstream.AdjustedUpdateInterval * 2;
- DirtyField(uid, bloodstream, nameof(BloodstreamComponent.StatusTime));
+ _status.TrySetStatusEffectDuration(uid, Bloodloss);
}
else if (!_mobStateSystem.IsDead(uid))
{
bloodstream.BloodlossHealDamage * bloodPercentage,
ignoreResistances: true, interruptsDoAfters: false);
- // Remove the drunk effect when healthy. Should only remove the amount of drunk and stutter added by low blood level
- _drunkSystem.TryRemoveDrunkenessTime(uid, bloodstream.StatusTime.TotalSeconds);
- _stutteringSystem.DoRemoveStutterTime(uid, bloodstream.StatusTime.TotalSeconds);
- // Reset the drunk and stutter time to zero
- bloodstream.StatusTime = TimeSpan.Zero;
- DirtyField(uid, bloodstream, nameof(BloodstreamComponent.StatusTime));
+ _status.TryRemoveStatusEffect(uid, Bloodloss);
}
}
}
+++ /dev/null
-using Robust.Shared.GameStates;
-
-namespace Content.Shared.Drunk;
-
-[RegisterComponent, NetworkedComponent]
-public sealed partial class DrunkComponent : Component { }
--- /dev/null
+using Robust.Shared.GameStates;
+
+namespace Content.Shared.Drunk;
+
+/// <summary>
+/// This is used by a status effect entity to apply the <see cref="DrunkComponent"/> to an entity.
+/// </summary>
+[RegisterComponent, NetworkedComponent]
+public sealed partial class DrunkStatusEffectComponent : Component
+{
+}
+++ /dev/null
-using Content.Shared.Speech.EntitySystems;
-using Content.Shared.StatusEffect;
-using Content.Shared.Traits.Assorted;
-using Robust.Shared.Prototypes;
-
-namespace Content.Shared.Drunk;
-
-public abstract class SharedDrunkSystem : EntitySystem
-{
- public static readonly ProtoId<StatusEffectPrototype> DrunkKey = "Drunk";
-
- [Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;
- [Dependency] private readonly SharedSlurredSystem _slurredSystem = default!;
-
- public void TryApplyDrunkenness(EntityUid uid, float boozePower, bool applySlur = true,
- StatusEffectsComponent? status = null)
- {
- if (!Resolve(uid, ref status, false))
- return;
-
- if (TryComp<LightweightDrunkComponent>(uid, out var trait))
- boozePower *= trait.BoozeStrengthMultiplier;
-
- if (applySlur)
- {
- _slurredSystem.DoSlur(uid, TimeSpan.FromSeconds(boozePower), status);
- }
-
- if (!_statusEffectsSystem.HasStatusEffect(uid, DrunkKey, status))
- {
- _statusEffectsSystem.TryAddStatusEffect<DrunkComponent>(uid, DrunkKey, TimeSpan.FromSeconds(boozePower), true, status);
- }
- else
- {
- _statusEffectsSystem.TryAddTime(uid, DrunkKey, TimeSpan.FromSeconds(boozePower), status);
- }
- }
-
- public void TryRemoveDrunkenness(EntityUid uid)
- {
- _statusEffectsSystem.TryRemoveStatusEffect(uid, DrunkKey);
- }
- public void TryRemoveDrunkenessTime(EntityUid uid, double timeRemoved)
- {
- _statusEffectsSystem.TryRemoveTime(uid, DrunkKey, TimeSpan.FromSeconds(timeRemoved));
- }
-
-}
--- /dev/null
+using Content.Shared.Speech.EntitySystems;
+using Content.Shared.StatusEffectNew;
+using Content.Shared.Traits.Assorted;
+using Robust.Shared.Prototypes;
+
+namespace Content.Shared.Drunk;
+
+public abstract class SharedDrunkSystem : EntitySystem
+{
+ public static EntProtoId Drunk = "StatusEffectDrunk";
+ public static EntProtoId Woozy = "StatusEffectWoozy";
+
+ /* I have no clue why this magic number was chosen, I copied it from slur system and needed it for the overlay
+ If you have a more intelligent magic number be my guest to completely explode this value.
+ There were no comments as to why this value was chosen three years ago. */
+ public static float MagicNumber = 1100f;
+
+ [Dependency] protected readonly StatusEffectsSystem Status = default!;
+
+ public override void Initialize()
+ {
+ SubscribeLocalEvent<LightweightDrunkComponent, DrunkEvent>(OnLightweightDrinking);
+ }
+
+ public void TryApplyDrunkenness(EntityUid uid, TimeSpan boozePower)
+ {
+ var ev = new DrunkEvent(boozePower);
+ RaiseLocalEvent(uid, ref ev);
+
+ Status.TryAddStatusEffectDuration(uid, Drunk, ev.Duration);
+ }
+
+ public void TryRemoveDrunkenness(EntityUid uid)
+ {
+ Status.TryRemoveStatusEffect(uid, Drunk);
+ }
+
+ public void TryRemoveDrunkennessTime(EntityUid uid, TimeSpan boozePower)
+ {
+ Status.TryAddTime(uid, Drunk, - boozePower);
+ }
+
+ private void OnLightweightDrinking(Entity<LightweightDrunkComponent> entity, ref DrunkEvent args)
+ {
+ args.Duration *= entity.Comp.BoozeStrengthMultiplier;
+ }
+
+ [ByRefEvent]
+ public record struct DrunkEvent(TimeSpan Duration);
+}
/// BoozePower is how long each metabolism cycle will make the drunk effect last for.
/// </summary>
[DataField]
- public float BoozePower = 3f;
-
- /// <summary>
- /// Whether speech should be slurred.
- /// </summary>
- [DataField]
- public bool SlurSpeech = true;
+ public TimeSpan BoozePower = TimeSpan.FromSeconds(3f);
protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys)
=> Loc.GetString("reagent-effect-guidebook-drunk", ("chance", Probability));
{
var boozePower = BoozePower;
- if (args is EntityEffectReagentArgs reagentArgs) {
+ if (args is EntityEffectReagentArgs reagentArgs)
boozePower *= reagentArgs.Scale.Float();
- }
var drunkSys = args.EntityManager.EntitySysManager.GetEntitySystem<SharedDrunkSystem>();
- drunkSys.TryApplyDrunkenness(args.TargetEntity, boozePower, SlurSpeech);
+ drunkSys.TryApplyDrunkenness(args.TargetEntity, boozePower);
}
}
using Content.Shared.StatusEffect;
+using Robust.Shared.Prototypes;
namespace Content.Shared.Speech.EntitySystems;
public abstract class SharedSlurredSystem : EntitySystem
{
+ public static readonly EntProtoId Stutter = "StatusEffectSlurred";
+
public virtual void DoSlur(EntityUid uid, TimeSpan time, StatusEffectsComponent? status = null) { }
}
-using Content.Shared.StatusEffect;
+using Content.Shared.StatusEffectNew;
using Robust.Shared.Prototypes;
namespace Content.Shared.Speech.EntitySystems;
public abstract class SharedStutteringSystem : EntitySystem
{
- public static readonly ProtoId<StatusEffectPrototype> StutterKey = "Stutter";
+ public static readonly EntProtoId Stuttering = "StatusEffectStutter";
- [Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;
+ [Dependency] protected readonly StatusEffectsSystem Status = default!;
// For code in shared... I imagine we ain't getting accent prediction anytime soon so let's not bother.
- public virtual void DoStutter(EntityUid uid, TimeSpan time, bool refresh, StatusEffectsComponent? status = null)
+ public virtual void DoStutter(EntityUid uid, TimeSpan time, bool refresh)
{
}
- public virtual void DoRemoveStutterTime(EntityUid uid, double timeRemoved)
+ public virtual void DoRemoveStutterTime(EntityUid uid, TimeSpan timeRemoved)
{
- _statusEffectsSystem.TryRemoveTime(uid, StutterKey, TimeSpan.FromSeconds(timeRemoved));
}
- public void DoRemoveStutter(EntityUid uid, double timeRemoved)
+ public virtual void DoRemoveStutter(EntityUid uid)
{
- _statusEffectsSystem.TryRemoveStatusEffect(uid, StutterKey);
}
}
-using Content.Shared.Alert;
using Content.Shared.Whitelist;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Content.Shared.Movement.Events;
using Content.Shared.Movement.Systems;
using Content.Shared.Rejuvenate;
+using Content.Shared.Speech;
using Content.Shared.StatusEffectNew.Components;
using Content.Shared.Stunnable;
using Robust.Shared.Player;
SubscribeLocalEvent<StatusEffectContainerComponent, StandUpAttemptEvent>(RefRelayStatusEffectEvent);
SubscribeLocalEvent<StatusEffectContainerComponent, StunEndAttemptEvent>(RefRelayStatusEffectEvent);
+
+ SubscribeLocalEvent<StatusEffectContainerComponent, AccentGetEvent>(RelayStatusEffectEvent);
}
private void RefRelayStatusEffectEvent<T>(EntityUid uid, StatusEffectContainerComponent component, ref T args) where T : struct
group: GenericNumber
- type: StatusEffects
allowed:
- - Stutter
- Electrocution
- TemporaryBlindness
- RadiationProtection
bodyType: KinematicController # Same for all inheritors
- type: StatusEffects
allowed:
- - Stutter
- Electrocution
- type: Pullable
- type: Tag
bodyType: KinematicController # Same for all inheritors
- type: StatusEffects
allowed:
- - Stutter
- Electrocution
- type: Repairable
doAfterDelay: 8
baseSprintSpeed : 4
- type: StatusEffects
allowed:
- - Stutter
- Electrocution
- TemporaryBlindness
- Pacified
baseDecayRate: 0.04
- type: StatusEffects
allowed:
- - Stutter
- Electrocution
- TemporaryBlindness
- Pacified
types: {}
- type: StatusEffects # Overwriting basesimplemob to remove flash, getting flashed as dragon just feelsbad
allowed:
- - Stutter
- Electrocution
- TemporaryBlindness
- Pacified
- !type:WashCreamPieReaction
- type: StatusEffects
allowed:
- - Stutter
- Electrocution
- - Drunk
- - SlurredSpeech
- RatvarianLanguage
- PressureImmunity
- Muted
--- /dev/null
+- type: entity
+ parent: MobStatusEffectBase
+ id: BloodstreamStatusEffectBase
+ abstract: true
+ components:
+ - type: StatusEffect
+ whitelist:
+ components:
+ - Bloodstream
+
+- type: entity
+ parent: [ BloodstreamStatusEffectBase ]
+ id: StatusEffectBloodloss
+ name: bloodloss
+ components:
+ - type: StutteringAccent
+ - type: DrunkStatusEffect
+ - type: RejuvenateRemovedStatusEffect
name: hallucinations
components:
- type: SeeingRainbowsStatusEffect
+
+# Causes your vision to become blurry and gives me a headache.
+- type: entity
+ parent: MobStatusEffectDebuff
+ id: StatusEffectWoozy
+ name: woozy
+ components:
+ - type: DrunkStatusEffect
+
+# Causes you to get drunk
+- type: entity
+ parent: [ StatusEffectWoozy, StatusEffectSlurred ]
+ id: StatusEffectDrunk
+ name: drunk
--- /dev/null
+- type: entity
+ parent: MobStatusEffectDebuff
+ id: SpeechStatusEffectBase
+ abstract: true
+ components:
+ - type: StatusEffect
+ whitelist:
+ components:
+ - MobState
+ - Speech
+ requireAll: true
+
+# Causes you to st-t-u-t-t-t-er randomly when talking.
+- type: entity
+ parent: SpeechStatusEffectBase
+ id: StatusEffectStutter
+ name: stutter
+ components:
+ - type: StutteringAccent
+
+# Causes you to schlur your words schwhen talking.
+- type: entity
+ parent: SpeechStatusEffectBase
+ id: StatusEffectSlurred
+ name: slurred
+ components:
+ - type: SlurredAccent
- !type:GenericStatusEffect
key: Stutter
component: ScrambledAccent
- - !type:Drunk
- slurSpeech: false
- boozePower: 20
+ - !type:ModifyStatusEffect
+ effectProto: StatusEffectSlurred
+ time: 20.0
- type: reagent
id: Dylovene
metabolisms:
Medicine:
effects:
- - !type:GenericStatusEffect
- key: Drunk
+ - !type:ModifyStatusEffect
+ effectProto: StatusEffectDrunk
time: 6.0
type: Remove
- !type:HealthChange
key: Jitter
time: 2.0
type: Remove
- - !type:GenericStatusEffect
- key: Drunk
+ - !type:ModifyStatusEffect
+ effectProto: StatusEffectDrunk
time: 6.0
type: Remove
- !type:PopupMessage # we dont have sanity/mood so this will have to do