Update trivial components to use auto comp states (#20539)
This commit is contained in:
@@ -5,8 +5,6 @@ using Content.Shared.Interaction;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.Radiation.Components;
|
||||
using Content.Shared.Radiation.Systems;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.Player;
|
||||
|
||||
@@ -32,7 +30,6 @@ public sealed class GeigerSystem : SharedGeigerSystem
|
||||
SubscribeLocalEvent<GeigerComponent, GotUnequippedHandEvent>(OnUnequippedHand);
|
||||
|
||||
SubscribeLocalEvent<RadiationSystemUpdatedEvent>(OnUpdate);
|
||||
SubscribeLocalEvent<GeigerComponent, ComponentGetState>(OnGetState);
|
||||
}
|
||||
|
||||
private void OnActivate(EntityUid uid, GeigerComponent component, ActivateInWorldEvent args)
|
||||
@@ -86,17 +83,6 @@ public sealed class GeigerSystem : SharedGeigerSystem
|
||||
}
|
||||
}
|
||||
|
||||
private void OnGetState(EntityUid uid, GeigerComponent component, ref ComponentGetState args)
|
||||
{
|
||||
args.State = new GeigerComponentState
|
||||
{
|
||||
CurrentRadiation = component.CurrentRadiation,
|
||||
DangerLevel = component.DangerLevel,
|
||||
IsEnabled = component.IsEnabled,
|
||||
User = GetNetEntity(component.User)
|
||||
};
|
||||
}
|
||||
|
||||
private void SetCurrentRadiation(EntityUid uid, GeigerComponent component, float rads)
|
||||
{
|
||||
// check that it's approx equal
|
||||
|
||||
Reference in New Issue
Block a user