Files
tbd-station-14/Content.Server/Chemistry/ReagentEffects/ResetNarcolepsy.cs
Scribbles0 27263892ef 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>
2023-01-11 02:14:16 -06:00

27 lines
712 B
C#

using Content.Server.Traits.Assorted;
using Content.Shared.Chemistry.Reagent;
using JetBrains.Annotations;
namespace Content.Server.Chemistry.ReagentEffects;
/// <summary>
/// Reset narcolepsy timer
/// </summary>
[UsedImplicitly]
public sealed class ResetNarcolepsy : ReagentEffect
{
/// <summary>
/// The # of seconds the effect resets the narcolepsy timer to
/// </summary>
[DataField("TimerReset")]
public int TimerReset = 600;
public override void Effect(ReagentEffectArgs args)
{
if (args.Scale != 1f)
return;
args.EntityManager.EntitySysManager.GetEntitySystem<NarcolepsySystem>().AdjustNarcolepsyTimer(args.SolutionEntity, TimerReset);
}
}