From 5682cb0d35f2b62b17a640d453824dc056cc0527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Sun, 4 Aug 2024 22:34:48 +0300 Subject: [PATCH] Fix jet in zero gravity --- .../Movement/Systems/SharedJetpackSystem.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Content.Shared/Movement/Systems/SharedJetpackSystem.cs b/Content.Shared/Movement/Systems/SharedJetpackSystem.cs index 276aa620324e27..90ca1f552e8560 100644 --- a/Content.Shared/Movement/Systems/SharedJetpackSystem.cs +++ b/Content.Shared/Movement/Systems/SharedJetpackSystem.cs @@ -125,8 +125,15 @@ private void OnJetpackToggle(EntityUid uid, JetpackComponent component, ToggleJe private bool CanEnableOnGrid(EntityUid? gridUid) { - return gridUid == null || - (!HasComp(gridUid)); + //return gridUid == null || + // (!HasComp(gridUid)); //SS220 Convert to comment + + //SS220 Fix jet in zero gravity begin + if (gridUid == null || !TryComp(gridUid, out var comp)) + return true; + + return !comp.Enabled; + //SS220 Fix jet in zero gravity end } private void OnJetpackGetAction(EntityUid uid, JetpackComponent component, GetItemActionsEvent args)