2022-12-07 02:56:52 +01:00
|
|
|
using Content.Client.Items;
|
|
|
|
|
using Content.Client.Radiation.UI;
|
|
|
|
|
using Content.Shared.Radiation.Components;
|
|
|
|
|
using Content.Shared.Radiation.Systems;
|
|
|
|
|
|
|
|
|
|
namespace Content.Client.Radiation.Systems;
|
|
|
|
|
|
|
|
|
|
public sealed class GeigerSystem : SharedGeigerSystem
|
|
|
|
|
{
|
|
|
|
|
public override void Initialize()
|
|
|
|
|
{
|
|
|
|
|
base.Initialize();
|
2023-09-28 16:20:29 -07:00
|
|
|
SubscribeLocalEvent<GeigerComponent, AfterAutoHandleStateEvent>(OnHandleState);
|
2024-01-12 01:14:13 +01:00
|
|
|
Subs.ItemStatus<GeigerComponent>(ent => ent.Comp.ShowControl ? new GeigerItemControl(ent) : null);
|
2022-12-07 02:56:52 +01:00
|
|
|
}
|
|
|
|
|
|
2023-09-28 16:20:29 -07:00
|
|
|
private void OnHandleState(EntityUid uid, GeigerComponent component, ref AfterAutoHandleStateEvent args)
|
2022-12-07 02:56:52 +01:00
|
|
|
{
|
|
|
|
|
component.UiUpdateNeeded = true;
|
|
|
|
|
}
|
|
|
|
|
}
|