Files
tbd-station-14/Content.Client/GameObjects/Components/StationEvents/RadiationPulseComponent.cs
DrSmugleaf 06b1939a60 Update usages of ! is with is not (#2584)
* Update usages of ! is with is not

* Content.IntegrationTests commit

* Content.Server commit

* Content.Shared commit

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-11-27 00:33:31 +11:00

41 lines
1.2 KiB
C#

#nullable enable
using System;
using Content.Shared.GameObjects.Components;
using Robust.Shared.GameObjects;
namespace Content.Client.GameObjects.Components.StationEvents
{
[RegisterComponent]
[ComponentReference(typeof(SharedRadiationPulseComponent))]
public sealed class RadiationPulseComponent : SharedRadiationPulseComponent
{
private bool _draw;
private bool _decay;
private float _radsPerSecond;
private float _range;
private TimeSpan _endTime;
public override float RadsPerSecond => _radsPerSecond;
public override float Range => _range;
public override TimeSpan EndTime => _endTime;
public override bool Draw => _draw;
public override bool Decay => _decay;
public override void HandleComponentState(ComponentState? curState, ComponentState? nextState)
{
base.HandleComponentState(curState, nextState);
if (curState is not RadiationPulseState state)
{
return;
}
_radsPerSecond = state.RadsPerSecond;
_range = state.Range;
_draw = state.Draw;
_decay = state.Decay;
_endTime = state.EndTime;
}
}
}