Puddle Evaporation Fix (#6584)
This commit is contained in:
@@ -68,10 +68,14 @@ namespace Content.Server.Fluids.EntitySystems
|
||||
var volumeScale = puddleComponent.CurrentVolume.Float() / puddleComponent.OverflowVolume.Float();
|
||||
var puddleSolution = _solutionContainerSystem.EnsureSolution(uid, puddleComponent.SolutionName);
|
||||
|
||||
// Puddles with volume below this threshold will have their sprite changed to a wet floor effect
|
||||
var wetFloorEffectThreshold = FixedPoint2.New(5);
|
||||
|
||||
bool hasEvaporationComponent = EntityManager.TryGetComponent<EvaporationComponent>(uid, out var evaporationComponent);
|
||||
bool canEvaporate = (hasEvaporationComponent &&
|
||||
(evaporationComponent.LowerLimit == 0 || puddleComponent.CurrentVolume > evaporationComponent.LowerLimit));
|
||||
|
||||
// "Does this puddle's sprite need changing to the wet floor effect sprite?"
|
||||
bool changeToWetFloor = (puddleComponent.CurrentVolume <= wetFloorEffectThreshold);
|
||||
bool changeToWetFloor = (puddleComponent.CurrentVolume <= puddleComponent.WetFloorEffectThreshold
|
||||
&& canEvaporate);
|
||||
|
||||
appearanceComponent.SetData(PuddleVisuals.VolumeScale, volumeScale);
|
||||
appearanceComponent.SetData(PuddleVisuals.SolutionColor, puddleSolution.Color);
|
||||
|
||||
Reference in New Issue
Block a user