Update trivial components to use auto comp states (#20539)

This commit is contained in:
DrSmugleaf
2023-09-28 16:20:29 -07:00
committed by GitHub
parent 14cfe44ece
commit a44fa86b68
158 changed files with 806 additions and 2866 deletions

View File

@@ -1,5 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Alert;
@@ -170,7 +169,6 @@ public abstract class AlertsSystem : EntitySystem
SubscribeLocalEvent<AlertsComponent, ComponentStartup>(HandleComponentStartup);
SubscribeLocalEvent<AlertsComponent, ComponentShutdown>(HandleComponentShutdown);
SubscribeLocalEvent<AlertsComponent, ComponentGetState>(ClientAlertsGetState);
SubscribeNetworkEvent<ClickAlertEvent>(HandleClickAlert);
LoadPrototypes();
@@ -243,9 +241,4 @@ public abstract class AlertsSystem : EntitySystem
alert.OnClick?.AlertClicked(player.Value);
}
private static void ClientAlertsGetState(EntityUid uid, AlertsComponent component, ref ComponentGetState args)
{
args.State = new AlertsComponentState(component.Alerts);
}
}