Make station components use StationPostInitEvent (#27126)

This commit is contained in:
Leon Friedrich
2024-04-19 17:26:56 +12:00
committed by GitHub
parent 8245caaf61
commit 36eaa8c941
2 changed files with 6 additions and 4 deletions

View File

@@ -10,6 +10,7 @@ using Content.Server.Shuttles.Components;
using Content.Server.Shuttles.Events;
using Content.Server.Spawners.Components;
using Content.Server.Station.Components;
using Content.Server.Station.Events;
using Content.Server.Station.Systems;
using Content.Shared.Administration;
using Content.Shared.CCVar;
@@ -77,7 +78,7 @@ public sealed class ArrivalsSystem : EntitySystem
{
base.Initialize();
SubscribeLocalEvent<StationArrivalsComponent, ComponentStartup>(OnArrivalsStartup);
SubscribeLocalEvent<StationArrivalsComponent, StationPostInitEvent>(OnStationPostInit);
SubscribeLocalEvent<ArrivalsShuttleComponent, ComponentStartup>(OnShuttleStartup);
SubscribeLocalEvent<ArrivalsShuttleComponent, FTLTagEvent>(OnShuttleTag);
@@ -530,7 +531,7 @@ public sealed class ArrivalsSystem : EntitySystem
}
}
private void OnArrivalsStartup(EntityUid uid, StationArrivalsComponent component, ComponentStartup args)
private void OnStationPostInit(EntityUid uid, StationArrivalsComponent component, ref StationPostInitEvent args)
{
if (!Enabled)
return;

View File

@@ -15,6 +15,7 @@ using Content.Server.Screens.Components;
using Content.Server.Shuttles.Components;
using Content.Server.Shuttles.Events;
using Content.Server.Station.Components;
using Content.Server.Station.Events;
using Content.Server.Station.Systems;
using Content.Shared.Access.Systems;
using Content.Shared.CCVar;
@@ -84,7 +85,7 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
SubscribeLocalEvent<RoundRestartCleanupEvent>(OnRoundCleanup);
SubscribeLocalEvent<StationEmergencyShuttleComponent, ComponentStartup>(OnStationStartup);
SubscribeLocalEvent<StationCentcommComponent, ComponentShutdown>(OnCentcommShutdown);
SubscribeLocalEvent<StationCentcommComponent, ComponentInit>(OnCentcommInit);
SubscribeLocalEvent<StationCentcommComponent, StationPostInitEvent>(OnStationPostInit);
SubscribeLocalEvent<EmergencyShuttleComponent, FTLStartedEvent>(OnEmergencyFTL);
SubscribeLocalEvent<EmergencyShuttleComponent, FTLCompletedEvent>(OnEmergencyFTLComplete);
@@ -319,7 +320,7 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
}
}
private void OnCentcommInit(EntityUid uid, StationCentcommComponent component, ComponentInit args)
private void OnStationPostInit(EntityUid uid, StationCentcommComponent component, ref StationPostInitEvent args)
{
if (!_emergencyShuttleEnabled)
return;