6
StarHorizon_Public/Content.Server/Alert/ServerAlertsSystem.cs
2025-12-18 02:55:17 +03:00

21 lines
540 B
C#

using Content.Shared.Alert;
using Robust.Shared.GameStates;
namespace Content.Server.Alert;
internal sealed class ServerAlertsSystem : AlertsSystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<AlertsComponent, ComponentGetState>(OnGetState);
}
private void OnGetState(Entity<AlertsComponent> alerts, ref ComponentGetState args)
{
// TODO: Use sourcegen when clone-state bug fixed.
args.State = new AlertComponentState(new(alerts.Comp.Alerts));
}
}