Add prediction to Spill Container verb, add dummy TrySpill methods to shared (#25813)
* Moved abstract spill methods to shared; added prediction to spill container verb. * Rerun tests * Requested changes * Note Client behavior in Spill method docs
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
using Content.Client.IconSmoothing;
|
||||
using Content.Shared.Chemistry.Components;
|
||||
using Content.Shared.Fluids;
|
||||
using Content.Shared.Fluids.Components;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Client.Fluids;
|
||||
|
||||
@@ -21,7 +23,7 @@ public sealed class PuddleSystem : SharedPuddleSystem
|
||||
if (args.Sprite == null)
|
||||
return;
|
||||
|
||||
float volume = 1f;
|
||||
var volume = 1f;
|
||||
|
||||
if (args.AppearanceData.TryGetValue(PuddleVisuals.CurrentVolume, out var volumeObj))
|
||||
{
|
||||
@@ -64,4 +66,38 @@ public sealed class PuddleSystem : SharedPuddleSystem
|
||||
args.Sprite.Color *= baseColor;
|
||||
}
|
||||
}
|
||||
|
||||
#region Spill
|
||||
|
||||
// Maybe someday we'll have clientside prediction for entity spawning, but not today.
|
||||
// Until then, these methods do nothing on the client.
|
||||
/// <inheritdoc/>
|
||||
public override bool TrySplashSpillAt(EntityUid uid, EntityCoordinates coordinates, Solution solution, out EntityUid puddleUid, bool sound = true, EntityUid? user = null)
|
||||
{
|
||||
puddleUid = EntityUid.Invalid;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override bool TrySpillAt(EntityCoordinates coordinates, Solution solution, out EntityUid puddleUid, bool sound = true)
|
||||
{
|
||||
puddleUid = EntityUid.Invalid;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override bool TrySpillAt(EntityUid uid, Solution solution, out EntityUid puddleUid, bool sound = true, TransformComponent? transformComponent = null)
|
||||
{
|
||||
puddleUid = EntityUid.Invalid;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override bool TrySpillAt(TileRef tileRef, Solution solution, out EntityUid puddleUid, bool sound = true, bool tileReact = true)
|
||||
{
|
||||
puddleUid = EntityUid.Invalid;
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion Spill
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user