From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Fri, 19 Apr 2024 05:26:56 +0000 (+1200) Subject: Make station components use StationPostInitEvent (#27126) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=36eaa8c941d2fff72d449b1199249efae6a9fa03;p=space-station-14.git Make station components use StationPostInitEvent (#27126) --- diff --git a/Content.Server/Shuttles/Systems/ArrivalsSystem.cs b/Content.Server/Shuttles/Systems/ArrivalsSystem.cs index ae742cf1f9..12df965f45 100644 --- a/Content.Server/Shuttles/Systems/ArrivalsSystem.cs +++ b/Content.Server/Shuttles/Systems/ArrivalsSystem.cs @@ -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(OnArrivalsStartup); + SubscribeLocalEvent(OnStationPostInit); SubscribeLocalEvent(OnShuttleStartup); SubscribeLocalEvent(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; diff --git a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs index c043861b37..16a5e26b54 100644 --- a/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs +++ b/Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs @@ -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(OnRoundCleanup); SubscribeLocalEvent(OnStationStartup); SubscribeLocalEvent(OnCentcommShutdown); - SubscribeLocalEvent(OnCentcommInit); + SubscribeLocalEvent(OnStationPostInit); SubscribeLocalEvent(OnEmergencyFTL); SubscribeLocalEvent(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;