using Content.Shared.Chemistry.Reagent; using Content.Shared.FixedPoint; 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 FixedPoint2 AvailableVolume => MaxVolume - CurrentVolume; public FixedPoint2 DrawAvailable => CurrentVolume; public FixedPoint2 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 FixedPoint2 MaxSpillRefill { get; set; } /// /// Initially set . If empty will be calculated based /// on sum of fixed units. /// [DataField("maxVol")] public FixedPoint2 InitialMaxVolume; [ViewVariables(VVAccess.ReadWrite)] public FixedPoint2 MaxVolume { get; set; } = FixedPoint2.Zero; [ViewVariables] public FixedPoint2 CurrentVolume => TotalVolume; } }