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:
26
Content.Server/Chemistry/ReagentEffects/ResetNarcolepsy.cs
Normal file
26
Content.Server/Chemistry/ReagentEffects/ResetNarcolepsy.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user