Combine solution injection systems; Fix embeddable injectors (#26268)
* Combine injection systems * Update Content.Server/Chemistry/EntitySystems/SolutionInjectOnEventSystem.cs --------- Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -1,31 +1,8 @@
|
||||
using Content.Shared.FixedPoint;
|
||||
namespace Content.Server.Chemistry.Components;
|
||||
|
||||
namespace Content.Server.Chemistry.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
public sealed partial class MeleeChemicalInjectorComponent : Component
|
||||
{
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("transferAmount")]
|
||||
public FixedPoint2 TransferAmount { get; set; } = FixedPoint2.New(1);
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float TransferEfficiency { get => _transferEfficiency; set => _transferEfficiency = Math.Clamp(value, 0, 1); }
|
||||
|
||||
[DataField("transferEfficiency")]
|
||||
private float _transferEfficiency = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this will inject through hardsuits or not.
|
||||
/// </summary>
|
||||
[DataField("pierceArmor"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool PierceArmor = true;
|
||||
|
||||
/// <summary>
|
||||
/// Solution to inject from.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("solution")]
|
||||
public string Solution { get; set; } = "default";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Used for melee weapon entities that should try to inject a
|
||||
/// contained solution into a target when used to hit it.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed partial class MeleeChemicalInjectorComponent : BaseSolutionInjectOnEventComponent { }
|
||||
|
||||
Reference in New Issue
Block a user