Minor spill refactors (#5569)
This commit is contained in:
@@ -88,6 +88,7 @@ namespace Content.Server.Fluids.Components
|
||||
* will spill some of the mop's solution onto the puddle which will evaporate eventually.
|
||||
*/
|
||||
var solutionSystem = EntitySystem.Get<SolutionContainerSystem>();
|
||||
var spillableSystem = EntitySystem.Get<SpillableSystem>();
|
||||
|
||||
if (!solutionSystem.TryGetSolution(Owner.Uid, SolutionName, out var contents ) ||
|
||||
Mopping ||
|
||||
@@ -105,8 +106,8 @@ namespace Content.Server.Fluids.Components
|
||||
if (eventArgs.Target == null)
|
||||
{
|
||||
// Drop the liquid on the mop on to the ground
|
||||
solutionSystem.SplitSolution(Owner.Uid, contents, FixedPoint2.Min(ResidueAmount, CurrentVolume))
|
||||
.SpillAt(eventArgs.ClickLocation, "PuddleSmear");
|
||||
var solution = solutionSystem.SplitSolution(Owner.Uid, contents, FixedPoint2.Min(ResidueAmount, CurrentVolume));
|
||||
spillableSystem.SpillAt(solution, eventArgs.ClickLocation, "PuddleSmear");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -146,9 +147,9 @@ namespace Content.Server.Fluids.Components
|
||||
|
||||
// After cleaning the puddle, make a new puddle with solution from the mop as a "wet floor". Then evaporate it slowly.
|
||||
// we do this WITHOUT adding to the existing puddle. Otherwise we have might have water puddles with the vomit sprite.
|
||||
solutionSystem.SplitSolution(Owner.Uid, contents, transferAmount)
|
||||
.SplitSolution(ResidueAmount)
|
||||
.SpillAt(eventArgs.ClickLocation, "PuddleSmear", combine: false);
|
||||
var splitSolution = solutionSystem.SplitSolution(Owner.Uid, contents, transferAmount)
|
||||
.SplitSolution(ResidueAmount);
|
||||
spillableSystem.SpillAt(splitSolution, eventArgs.ClickLocation, "PuddleSmear", combine: false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user