From 3b142890cd904456376c84f7fb87ba16d7648f03 Mon Sep 17 00:00:00 2001 From: slarticodefast <161409025+slarticodefast@users.noreply.github.com> Date: Fri, 14 Feb 2025 00:44:27 +0100 Subject: [PATCH] minor thruster system cleanup (#35143) --- Content.Server/Shuttles/Systems/ThrusterSystem.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Content.Server/Shuttles/Systems/ThrusterSystem.cs b/Content.Server/Shuttles/Systems/ThrusterSystem.cs index a75ddc911a..74008a6af7 100644 --- a/Content.Server/Shuttles/Systems/ThrusterSystem.cs +++ b/Content.Server/Shuttles/Systems/ThrusterSystem.cs @@ -44,6 +44,7 @@ public sealed class ThrusterSystem : EntitySystem base.Initialize(); SubscribeLocalEvent(OnActivateThruster); SubscribeLocalEvent(OnThrusterInit); + SubscribeLocalEvent(OnMapInit); SubscribeLocalEvent(OnThrusterShutdown); SubscribeLocalEvent(OnPowerChange); SubscribeLocalEvent(OnAnchorChange); @@ -232,8 +233,6 @@ public sealed class ThrusterSystem : EntitySystem private void OnThrusterInit(EntityUid uid, ThrusterComponent component, ComponentInit args) { - component.NextFire = _timing.CurTime + component.FireCooldown; - _ambient.SetAmbience(uid, false); if (!component.Enabled) @@ -247,6 +246,11 @@ public sealed class ThrusterSystem : EntitySystem } } + private void OnMapInit(Entity ent, ref MapInitEvent args) + { + ent.Comp.NextFire = _timing.CurTime + ent.Comp.FireCooldown; + } + private void OnThrusterShutdown(EntityUid uid, ThrusterComponent component, ComponentShutdown args) { DisableThruster(uid, component); -- 2.51.2