Spill into containers lying around (#3345)

* Spill into containers lying around

* Make spillability definable in yaml

* Address reviews
This commit is contained in:
Clyybber
2021-02-21 02:14:41 +01:00
committed by GitHub
parent c3b4753cc1
commit c5ab6f191b
3 changed files with 40 additions and 80 deletions

View File

@@ -73,6 +73,7 @@ namespace Content.Shared.GameObjects.Components.Chemistry
serializer.DataField(this, x => x.MaxVolume, "maxVol", ReagentUnit.New(0));
serializer.DataField(this, x => x.Solution, "contents", new Solution());
serializer.DataField(this, x => x.Capabilities, "caps", SolutionContainerCaps.None);
serializer.DataField(this, x => x.MaxSpillRefill, "maxSpillRefill", MaxVolume / ReagentUnit.New(4));
}
public void RemoveAllSolution()
@@ -214,6 +215,7 @@ namespace Content.Shared.GameObjects.Components.Chemistry
ReagentUnit ISolutionInteractionsComponent.InjectSpaceAvailable => EmptyVolume;
ReagentUnit ISolutionInteractionsComponent.DrawAvailable => CurrentVolume;
ReagentUnit ISolutionInteractionsComponent.DrainAvailable => CurrentVolume;
public ReagentUnit MaxSpillRefill { get; set; }
void ISolutionInteractionsComponent.Refill(Solution solution)
{