Add prediction for puddle and spillable examines (#25794)

Prediction for puddle and spillable examines
This commit is contained in:
Tayrtahn
2024-03-03 00:36:36 -05:00
committed by GitHub
parent a0b33def48
commit 4943151111
11 changed files with 96 additions and 74 deletions

View File

@@ -1,24 +0,0 @@
using Content.Server.Fluids.EntitySystems;
using Content.Shared.FixedPoint;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.Fluids.Components;
/// <summary>
/// Added to puddles that contain water so it may evaporate over time.
/// </summary>
[RegisterComponent, Access(typeof(PuddleSystem))]
public sealed partial class EvaporationComponent : Component
{
/// <summary>
/// The next time we remove the EvaporationSystem reagent amount from this entity.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField("nextTick", customTypeSerializer:typeof(TimeOffsetSerializer))]
public TimeSpan NextTick = TimeSpan.Zero;
/// <summary>
/// How much evaporation occurs every tick.
/// </summary>
[DataField("evaporationAmount")]
public FixedPoint2 EvaporationAmount = FixedPoint2.New(0.3);
}

View File

@@ -1,26 +0,0 @@
using Content.Shared.FixedPoint;
namespace Content.Server.Fluids.Components;
[RegisterComponent]
public sealed partial class SpillableComponent : Component
{
[DataField("solution")]
public string SolutionName = "puddle";
/// <summary>
/// Should this item be spilled when worn as clothing?
/// Doesn't count for pockets or hands.
/// </summary>
[DataField("spillWorn")]
public bool SpillWorn = true;
[DataField("spillDelay")]
public float? SpillDelay;
/// <summary>
/// At most how much reagent can be splashed on someone at once?
/// </summary>
[DataField("maxMeleeSpillAmount")]
public FixedPoint2 MaxMeleeSpillAmount = FixedPoint2.New(20);
}