From: lzk <124214523+lzk228@users.noreply.github.com> Date: Thu, 4 Apr 2024 06:28:33 +0000 (+0200) Subject: Fix turned off thrusters consume power (#26690) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=70959e7bb081c1a6e1457a8f8ee7732da91bb270;p=space-station-14.git Fix turned off thrusters consume power (#26690) --- 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)