From 70959e7bb081c1a6e1457a8f8ee7732da91bb270 Mon Sep 17 00:00:00 2001 From: lzk <124214523+lzk228@users.noreply.github.com> Date: Thu, 4 Apr 2024 08:28:33 +0200 Subject: [PATCH] Fix turned off thrusters consume power (#26690) --- Content.Server/Shuttles/Systems/ThrusterSystem.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Content.Server/Shuttles/Systems/ThrusterSystem.cs b/Content.Server/Shuttles/Systems/ThrusterSystem.cs index 74c42ccbc5..be55cd9a62 100644 --- a/Content.Server/Shuttles/Systems/ThrusterSystem.cs +++ b/Content.Server/Shuttles/Systems/ThrusterSystem.cs @@ -264,6 +264,11 @@ public sealed class ThrusterSystem : EntitySystem return; } + if (TryComp(uid, out var apcPower)) + { + apcPower.NeedsPower = true; + } + component.IsOn = true; if (!EntityManager.TryGetComponent(xform.GridUid, out ShuttleComponent? shuttleComponent)) @@ -366,6 +371,11 @@ public sealed class ThrusterSystem : EntitySystem if (!EntityManager.TryGetComponent(gridId, out ShuttleComponent? shuttleComponent)) return; + if (TryComp(uid, out var apcPower)) + { + apcPower.NeedsPower = false; + } + // Logger.DebugS("thruster", $"Disabled thruster {uid}"); switch (component.Type) -- 2.52.0