Puddle Visuals: ECS/Refactor and fixes (#11941)

* Don't stop me now, cuz I'm havin' such a good time (I'm havin' a ball!)

* YEET

* No changes to intended behaviour at this point. Pretty much just a refactor + bugfixes.

* tweaks to RandomizeState, removing an error caused by setting the state after setting the RSI

* Comments cleanup and removed IsSlippery. To re-add soon for this PR.

* test

* We don't actually use this PuddleGeneric anywhere

* cheeky

* Uncheeky, and tweaks based on #8203

* Recheeky

* A small price to pay for `checks passed`

* Beauty, like ice, our footing does betray; Who can tread sure on the smooth, slippery way

* Undo Slippery Checks

* Begin smoothing. Need to fix the animation-not-playing bug again

* Cleanup

* animation bugfix

* IgnoredComponents tests fix
This commit is contained in:
Willhelm53
2022-12-19 20:40:53 -06:00
committed by GitHub
parent 3327c2998f
commit a1dcc500a8
12 changed files with 208 additions and 157 deletions

View File

@@ -12,7 +12,7 @@ namespace Content.Server.Fluids.Components
public sealed class PuddleComponent : Component
{
public const string DefaultSolutionName = "puddle";
private static readonly FixedPoint2 DefaultSlipThreshold = FixedPoint2.New(-1);
private static readonly FixedPoint2 DefaultSlipThreshold = FixedPoint2.New(-1); //Not slippery by default. Set specific slipThresholds in YAML if you want your puddles to be slippery. Lower = more slippery, and zero means any volume can slip.
public static readonly FixedPoint2 DefaultOverflowVolume = FixedPoint2.New(20);
// Current design: Something calls the SpillHelper.Spill, that will either
@@ -33,13 +33,6 @@ namespace Content.Server.Fluids.Components
[DataField("slipThreshold")]
public FixedPoint2 SlipThreshold = DefaultSlipThreshold;
/// <summary>
/// Puddles with volume below this threshold will have their sprite changed to a wet floor effect,
/// provided they can evaporate down to zero.
/// </summary>
[DataField("wetFloorEffectThreshold")]
public FixedPoint2 WetFloorEffectThreshold = FixedPoint2.New(5);
[DataField("spillSound")]
public SoundSpecifier SpillSound = new SoundPathSpecifier("/Audio/Effects/Fluids/splat.ogg");