From: osjarw <62134478+osjarw@users.noreply.github.com> Date: Wed, 24 Jul 2024 19:26:52 +0000 (+0300) Subject: Make `NeedHand` modifiable for injectorSystem (#29870) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=aa886ca494e933155c896838a456e2d4d60fbf2f;p=space-station-14.git Make `NeedHand` modifiable for injectorSystem (#29870) * Get needhand from yml * MovementThreshold modifiable + inheritdoc --- diff --git a/Content.Server/Chemistry/EntitySystems/InjectorSystem.cs b/Content.Server/Chemistry/EntitySystems/InjectorSystem.cs index 54c3fd576f..d94faa8123 100644 --- a/Content.Server/Chemistry/EntitySystems/InjectorSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/InjectorSystem.cs @@ -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, }); } diff --git a/Content.Shared/Chemistry/Components/InjectorComponent.cs b/Content.Shared/Chemistry/Components/InjectorComponent.cs index aec6834063..1f2716356c 100644 --- a/Content.Shared/Chemistry/Components/InjectorComponent.cs +++ b/Content.Shared/Chemistry/Components/InjectorComponent.cs @@ -87,6 +87,22 @@ public sealed partial class InjectorComponent : Component [AutoNetworkedField] [DataField] public InjectorToggleMode ToggleState = InjectorToggleMode.Draw; + + #region Arguments for injection doafter + + /// + [DataField] + public bool NeedHand = true; + + /// + [DataField] + public bool BreakOnHandChange = true; + + /// + [DataField] + public float MovementThreshold = 0.1f; + + #endregion } ///