]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add PreventFTLComponent and changed FTL check (#34077)
authorAaron <betterwithketchup@gmail.com>
Sat, 19 Apr 2025 00:14:44 +0000 (20:14 -0400)
committerGitHub <noreply@github.com>
Sat, 19 Apr 2025 00:14:44 +0000 (20:14 -0400)
* Add PreventFTLComponent and changed FTL check

* Remove component body.

---------

Co-authored-by: Milon <milonpl.git@proton.me>
Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs
Content.Shared/Shuttles/Components/PreventFTLComponent.cs [new file with mode: 0644]

index cae6c443dda78b01166e3ee7b829103654f28133..40464e516f1ef601025b59d102e6c12d27fc2ab9 100644 (file)
@@ -243,7 +243,7 @@ public sealed partial class ShuttleSystem
             }
         }
 
-        if (HasComp<PreventPilotComponent>(shuttleUid))
+        if (HasComp<PreventPilotComponent>(shuttleUid) || HasComp<PreventFTLComponent>(shuttleUid))
         {
             reason = Loc.GetString("shuttle-console-prevent");
             return false;
diff --git a/Content.Shared/Shuttles/Components/PreventFTLComponent.cs b/Content.Shared/Shuttles/Components/PreventFTLComponent.cs
new file mode 100644 (file)
index 0000000..343e1ff
--- /dev/null
@@ -0,0 +1,9 @@
+using Robust.Shared.GameStates;
+
+namespace Content.Shared.Shuttles.Components;
+
+/// <summary>
+/// Add to grids that you do not want to FTL, but still might want to pilot.
+/// </summary>
+[RegisterComponent, NetworkedComponent]
+public sealed partial class PreventFTLComponent : Component;