2022-05-13 00:59:03 -07:00
|
|
|
|
using Content.Shared.FixedPoint;
|
2022-05-12 18:59:03 +08:00
|
|
|
|
using Content.Shared.Inventory;
|
2024-01-11 01:02:37 +02:00
|
|
|
|
using Content.Shared.Projectiles;
|
2021-07-21 01:41:22 +10:00
|
|
|
|
|
2024-01-03 18:57:36 +11:00
|
|
|
|
namespace Content.Server.Chemistry.Components;
|
2021-07-21 01:41:22 +10:00
|
|
|
|
|
2024-01-03 18:57:36 +11:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// On colliding with an entity that has a bloodstream will dump its solution onto them.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[RegisterComponent]
|
|
|
|
|
|
public sealed partial class SolutionInjectOnCollideComponent : Component
|
|
|
|
|
|
{
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
|
[DataField("transferAmount")]
|
|
|
|
|
|
public FixedPoint2 TransferAmount = FixedPoint2.New(1);
|
2021-07-21 01:41:22 +10:00
|
|
|
|
|
2024-01-03 18:57:36 +11:00
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
|
public float TransferEfficiency { get => _transferEfficiency; set => _transferEfficiency = Math.Clamp(value, 0, 1); }
|
2021-07-21 01:41:22 +10:00
|
|
|
|
|
2024-01-03 18:57:36 +11:00
|
|
|
|
[DataField("transferEfficiency")]
|
|
|
|
|
|
private float _transferEfficiency = 1f;
|
2022-05-12 18:59:03 +08:00
|
|
|
|
|
2024-01-03 18:57:36 +11:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// If anything covers any of these slots then the injection fails.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataField("blockSlots"), ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
|
public SlotFlags BlockSlots = SlotFlags.MASK;
|
2024-01-11 01:02:37 +02:00
|
|
|
|
|
|
|
|
|
|
[DataField]
|
|
|
|
|
|
public string FixtureId = SharedProjectileSystem.ProjectileFixture;
|
2021-07-21 01:41:22 +10:00
|
|
|
|
}
|