Add prediction for puddle and spillable examines (#25794)
Prediction for puddle and spillable examines
This commit is contained in:
25
Content.Shared/Fluids/Components/EvaporationComponent.cs
Normal file
25
Content.Shared/Fluids/Components/EvaporationComponent.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Content.Shared.FixedPoint;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||
|
||||
namespace Content.Shared.Fluids.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Added to puddles that contain water so it may evaporate over time.
|
||||
/// </summary>
|
||||
[NetworkedComponent]
|
||||
[RegisterComponent, Access(typeof(SharedPuddleSystem))]
|
||||
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);
|
||||
}
|
||||
@@ -11,10 +11,10 @@ namespace Content.Shared.Fluids.Components
|
||||
[RegisterComponent, NetworkedComponent, Access(typeof(SharedPuddleSystem))]
|
||||
public sealed partial class PuddleComponent : Component
|
||||
{
|
||||
[DataField("spillSound")]
|
||||
[DataField]
|
||||
public SoundSpecifier SpillSound = new SoundPathSpecifier("/Audio/Effects/Fluids/splat.ogg");
|
||||
|
||||
[DataField("overflowVolume")]
|
||||
[DataField]
|
||||
public FixedPoint2 OverflowVolume = FixedPoint2.New(20);
|
||||
|
||||
[DataField("solution")] public string SolutionName = "puddle";
|
||||
|
||||
26
Content.Shared/Fluids/Components/SpillableComponent.cs
Normal file
26
Content.Shared/Fluids/Components/SpillableComponent.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Content.Shared.FixedPoint;
|
||||
|
||||
namespace Content.Shared.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]
|
||||
public bool SpillWorn = true;
|
||||
|
||||
[DataField]
|
||||
public float? SpillDelay;
|
||||
|
||||
/// <summary>
|
||||
/// At most how much reagent can be splashed on someone at once?
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public FixedPoint2 MaxMeleeSpillAmount = FixedPoint2.New(20);
|
||||
}
|
||||
Reference in New Issue
Block a user