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:
Scribbles0
2023-01-11 00:14:16 -08:00
committed by GitHub
parent 149bc046fd
commit 27263892ef
3 changed files with 47 additions and 1 deletions

View File

@@ -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);