28 lines
923 B
C#
28 lines
923 B
C#
using System;
|
|
using Content.Shared.Chemistry.Reagent;
|
|
using Content.Shared.FixedPoint;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
namespace Content.Server.Chemistry.Components
|
|
{
|
|
/// <summary>
|
|
/// On colliding with an entity that has a bloodstream will dump its solution onto them.
|
|
/// </summary>
|
|
[RegisterComponent]
|
|
internal sealed class SolutionInjectOnCollideComponent : 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;
|
|
}
|
|
}
|