Add dizziness as a symptom of bloodloss (#10172)
This commit is contained in:
@@ -10,13 +10,15 @@ public abstract class SharedDrunkSystem : EntitySystem
|
||||
[Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;
|
||||
[Dependency] private readonly SharedSlurredSystem _slurredSystem = default!;
|
||||
|
||||
public void TryApplyDrunkenness(EntityUid uid, float boozePower,
|
||||
public void TryApplyDrunkenness(EntityUid uid, float boozePower, bool applySlur = true,
|
||||
StatusEffectsComponent? status = null)
|
||||
{
|
||||
if (!Resolve(uid, ref status, false))
|
||||
return;
|
||||
|
||||
_slurredSystem.DoSlur(uid, TimeSpan.FromSeconds(boozePower), status);
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user