Files
tbd-station-14/Content.Server/MobState/MobStateSystem.cs
2022-07-06 17:58:14 +10:00

20 lines
578 B
C#

using Content.Shared.MobState.Components;
using Content.Shared.MobState.EntitySystems;
using Robust.Shared.GameStates;
namespace Content.Server.MobState;
public sealed partial class MobStateSystem : SharedMobStateSystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<MobStateComponent, ComponentGetState>(OnMobGetState);
}
private void OnMobGetState(EntityUid uid, MobStateComponent component, ref ComponentGetState args)
{
args.State = new MobStateComponentState(component.CurrentThreshold);
}
}