Mopping Puddle Dilution and Wet Floor Sparkles (#6273)

This commit is contained in:
Willhelm53
2022-02-04 20:26:11 -06:00
committed by GitHub
parent 3d3a3c857b
commit 4d3a381962
10 changed files with 87 additions and 20 deletions

View File

@@ -68,8 +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);
// "Does this puddle's sprite need changing to the wet floor effect sprite?"
bool changeToWetFloor = (puddleComponent.CurrentVolume <= wetFloorEffectThreshold);
appearanceComponent.SetData(PuddleVisuals.VolumeScale, volumeScale);
appearanceComponent.SetData(PuddleVisuals.SolutionColor, puddleSolution.Color);
appearanceComponent.SetData(PuddleVisuals.ForceWetFloorSprite, changeToWetFloor);
}
private void UpdateSlip(EntityUid entityUid, PuddleComponent puddleComponent)