Narcolepsy Treatment (#13427)
* ResetNarcolepsy.cs and NarcolepsySystem.cs changes * fix multiple narcolepsy incidents * comment * Update Content.Server/Chemistry/ReagentEffects/ResetNarcolepsy.cs Co-authored-by: 0x6273 <0x40@keemail.me> * try to fix tests Co-authored-by: 0x6273 <0x40@keemail.me>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Content.Shared.Bed.Sleep;
|
||||
using Content.Shared.Bed.Sleep;
|
||||
using Content.Shared.StatusEffect;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
@@ -26,6 +26,14 @@ public sealed class NarcolepsySystem : EntitySystem
|
||||
_random.NextFloat(component.TimeBetweenIncidents.X, component.TimeBetweenIncidents.Y);
|
||||
}
|
||||
|
||||
public void AdjustNarcolepsyTimer(EntityUid uid, int TimerReset, NarcolepsyComponent? narcolepsy = null)
|
||||
{
|
||||
if (!Resolve(uid, ref narcolepsy, false))
|
||||
return;
|
||||
|
||||
narcolepsy.NextIncidentTime = TimerReset;
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
Reference in New Issue
Block a user