From c7c7f6ce8ef85aeee3eb7e265688c1b970e2c82f Mon Sep 17 00:00:00 2001 From: Ed <96445749+TheShuEd@users.noreply.github.com> Date: Thu, 18 Jul 2024 17:17:06 +0300 Subject: [PATCH 1/2] Update LatheSystem.cs --- Content.Server/Lathe/LatheSystem.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Content.Server/Lathe/LatheSystem.cs b/Content.Server/Lathe/LatheSystem.cs index 7448a9b84dd2..f08f4abc2316 100644 --- a/Content.Server/Lathe/LatheSystem.cs +++ b/Content.Server/Lathe/LatheSystem.cs @@ -182,7 +182,9 @@ public bool TryStartProducing(EntityUid uid, LatheComponent? component = null) { if (!Resolve(uid, ref component)) return false; - if (component.CurrentRecipe != null || component.Queue.Count <= 0 || !this.IsPowered(uid, EntityManager)) + if (component.CurrentRecipe != null || component.Queue.Count <= 0) + return false; + if (HasComp(uid) && !this.IsPowered(uid, EntityManager)) return false; var recipe = component.Queue.First(); From 36178a49f30b8ebb058d70190fe02a2b248e092a Mon Sep 17 00:00:00 2001 From: Ed <96445749+TheShuEd@users.noreply.github.com> Date: Thu, 18 Jul 2024 17:34:04 +0300 Subject: [PATCH 2/2] Emo --- Content.Server/Lathe/LatheSystem.cs | 4 +--- Content.Server/Power/EntitySystems/StaticPowerSystem.cs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Content.Server/Lathe/LatheSystem.cs b/Content.Server/Lathe/LatheSystem.cs index f08f4abc2316..7448a9b84dd2 100644 --- a/Content.Server/Lathe/LatheSystem.cs +++ b/Content.Server/Lathe/LatheSystem.cs @@ -182,9 +182,7 @@ public bool TryStartProducing(EntityUid uid, LatheComponent? component = null) { if (!Resolve(uid, ref component)) return false; - if (component.CurrentRecipe != null || component.Queue.Count <= 0) - return false; - if (HasComp(uid) && !this.IsPowered(uid, EntityManager)) + if (component.CurrentRecipe != null || component.Queue.Count <= 0 || !this.IsPowered(uid, EntityManager)) return false; var recipe = component.Queue.First(); diff --git a/Content.Server/Power/EntitySystems/StaticPowerSystem.cs b/Content.Server/Power/EntitySystems/StaticPowerSystem.cs index 9e11d9311af3..61a23e501df9 100644 --- a/Content.Server/Power/EntitySystems/StaticPowerSystem.cs +++ b/Content.Server/Power/EntitySystems/StaticPowerSystem.cs @@ -9,7 +9,7 @@ public static class StaticPowerSystem public static bool IsPowered(this EntitySystem system, EntityUid uid, IEntityManager entManager, ApcPowerReceiverComponent? receiver = null) { if (receiver == null && !entManager.TryGetComponent(uid, out receiver)) - return false; + return true; return receiver.Powered; }