]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Make `NeedHand` modifiable for injectorSystem (#29870)
authorosjarw <62134478+osjarw@users.noreply.github.com>
Wed, 24 Jul 2024 19:26:52 +0000 (22:26 +0300)
committerGitHub <noreply@github.com>
Wed, 24 Jul 2024 19:26:52 +0000 (12:26 -0700)
* Get needhand from yml

* MovementThreshold modifiable + inheritdoc

Content.Server/Chemistry/EntitySystems/InjectorSystem.cs
Content.Shared/Chemistry/Components/InjectorComponent.cs

index 54c3fd576fe5426aa7f32ddd4924b6e84b56e89c..d94faa8123291b6b0ffd24f8ae03cc9060781183 100644 (file)
@@ -203,9 +203,9 @@ public sealed class InjectorSystem : SharedInjectorSystem
             BreakOnMove = true,
             BreakOnWeightlessMove = false,
             BreakOnDamage = true,
-            NeedHand = true,
-            BreakOnHandChange = true,
-            MovementThreshold = 0.1f,
+            NeedHand = injector.Comp.NeedHand,
+            BreakOnHandChange = injector.Comp.BreakOnHandChange,
+            MovementThreshold = injector.Comp.MovementThreshold,
         });
     }
 
index aec6834063903188a91ddde0493e52efd6837cb7..1f2716356c50fa91f81e9c6e6cf698565d049fea 100644 (file)
@@ -87,6 +87,22 @@ public sealed partial class InjectorComponent : Component
     [AutoNetworkedField]
     [DataField]
     public InjectorToggleMode ToggleState = InjectorToggleMode.Draw;
+
+    #region Arguments for injection doafter
+
+    /// <inheritdoc cref=DoAfterArgs.NeedHand>
+    [DataField]
+    public bool NeedHand = true;
+
+    /// <inheritdoc cref=DoAfterArgs.BreakOnHandChange>
+    [DataField]
+    public bool BreakOnHandChange = true;
+
+    /// <inheritdoc cref=DoAfterArgs.MovementThreshold>
+    [DataField]
+    public float MovementThreshold = 0.1f;
+
+    #endregion
 }
 
 /// <summary>