Skip to content

Commit

Permalink
Make NeedHand modifiable for injectorSystem (space-wizards#29870)
Browse files Browse the repository at this point in the history
* Get needhand from yml

* MovementThreshold modifiable + inheritdoc
  • Loading branch information
osjarw authored Jul 24, 2024
1 parent c4dcc90 commit aa886ca
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Content.Server/Chemistry/EntitySystems/InjectorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ private void InjectDoAfter(Entity<InjectorComponent> injector, EntityUid target,
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,
});
}

Expand Down
16 changes: 16 additions & 0 deletions Content.Shared/Chemistry/Components/InjectorComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit aa886ca

Please sign in to comment.