Files
tbd-station-14/Content.Client/Radiation/RadiationPulseComponent.cs
Kara b9a0894d7c Event refactor (#9589)
* Station event refactor

* Remove clientside `IStationEventManager`

we can just use prototypes

* Basic API idea

* Cruft

* first attempt at epicness

* okay yeah this shit is really clean

* sort out minor stuff

* Convert `BreakerFlip`

* `BureaucraticError` + general cleanup

* `DiseaseOutbreak`

* `FalseAlarm`

* `GasLeak`

* `KudzuGrowth`

* `MeteorSwarm`

* `MouseMigration`

* misc errors

* `PowerGridCheck`

* `RandomSentience`

* `VentClog`

* `VentCritters`

* `ZombieOutbreak`

* Rewrite basic event scheduler

* Minor fixes and logging

* ooooops

* errors + fix

* linter

* completions, `RuleStarted` property, update loop fixes

* Tweaks

* Fix #9462

* Basic scheduler update fix, and fixes #8174

* Add test

* UI cleanup

* really this was just for testing
2022-07-10 20:48:41 -05:00

38 lines
1.1 KiB
C#

using Content.Shared.Radiation;
namespace Content.Client.Radiation
{
[RegisterComponent]
[ComponentReference(typeof(SharedRadiationPulseComponent))]
public sealed class RadiationPulseComponent : SharedRadiationPulseComponent
{
private bool _draw;
private bool _decay;
private float _range;
private TimeSpan _startTime;
private TimeSpan _endTime;
public override float Range => _range;
public override TimeSpan StartTime => _startTime;
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;
}
_range = state.Range;
_draw = state.Draw;
_decay = state.Decay;
_startTime = state.StartTime;
_endTime = state.EndTime;
}
}
}