using Content.Shared.Chemistry.Reagent;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Shared.Chemistry.Components
{
public partial class Solution
{
///
/// If reactions will be checked for when adding reagents to the container.
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField("canReact")]
public bool CanReact { get; set; } = true;
///
/// Volume needed to fill this container.
///
[ViewVariables]
public ReagentUnit AvailableVolume => MaxVolume - CurrentVolume;
public ReagentUnit DrawAvailable => CurrentVolume;
public ReagentUnit DrainAvailable => CurrentVolume;
///
/// Checks if a solution can fit into the container.
///
/// The solution that is trying to be added.
/// If the solution can be fully added.
public bool CanAddSolution(Solution solution)
{
return solution.TotalVolume <= AvailableVolume;
}
[DataField("maxSpillRefill")]
public ReagentUnit MaxSpillRefill { get; set; }
///
/// Initially set . If empty will be calculated based
/// on sum of reagent units.
///
[DataField("maxVol")] public ReagentUnit InitialMaxVolume;
[ViewVariables(VVAccess.ReadWrite)]
public ReagentUnit MaxVolume { get; set; } = ReagentUnit.Zero;
[ViewVariables]
public ReagentUnit CurrentVolume => TotalVolume;
}
}