]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Make xenoborg thrusters anti-easy-sabotagge (#42201)
authorSamuka <47865393+Samuka-C@users.noreply.github.com>
Thu, 1 Jan 2026 21:23:34 +0000 (18:23 -0300)
committerGitHub <noreply@github.com>
Thu, 1 Jan 2026 21:23:34 +0000 (21:23 +0000)
* code

* cant be toggled

* can't unwrench

* no rotating it

* comments

* change from PreventToggle to CanToggle

* commentary

* Update Resources/Prototypes/Entities/Structures/Shuttles/thrusters.yml

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Content.Server/Shuttles/Components/ThrusterComponent.cs
Content.Server/Shuttles/Systems/ThrusterSystem.cs
Resources/Prototypes/Entities/Structures/Shuttles/thrusters.yml

index 20f020743d14e81f0ef8e0a2ffe27777e2f5225e..2a68b4f2909bb7bd157d506028f8986d3eab2980 100644 (file)
@@ -10,6 +10,12 @@ namespace Content.Server.Shuttles.Components
     [Access(typeof(ThrusterSystem))]
     public sealed partial class ThrusterComponent : Component
     {
+        /// <summary>
+        /// If the thruster can be toggled on or off via interaction
+        /// </summary>
+        [DataField]
+        public bool CanToggle = true;
+
         /// <summary>
         /// Whether the thruster has been force to be enabled / disabled (e.g. VV, interaction, etc.)
         /// </summary>
index 20040ab40a239457efc70410c6820e87f6e40e80..3d3cf1aa285d62bb9c760ded4481c953cb6e099d 100644 (file)
@@ -135,7 +135,7 @@ public sealed class ThrusterSystem : EntitySystem
 
     private void OnActivateThruster(EntityUid uid, ThrusterComponent component, ActivateInWorldEvent args)
     {
-        if (args.Handled || !args.Complex)
+        if (args.Handled || !args.Complex || !component.CanToggle)
             return;
 
         component.Enabled ^= true;
index bb43cb3b2c378b29af282d5b4413318b76928dde..e251d1bfff3a74505d58a2c803369231be2e2dfd 100644 (file)
   parent: Thruster
   id: ThrusterXenoborg
   components:
+  # temporary solution until thruster rework
+  - type: Thruster
+    canToggle: false # no turning it off by just clicking it
+  - type: Anchorable
+    flags:
+    - Anchorable # no unwrenching it
+  - type: Rotatable
+    rotateWhileAnchored: false # no rotating it backwards so it doesn't face space
   - type: Sprite
     sprite: Structures/Shuttles/xenoborg_thruster.rsi