Puddles & spreader refactor (#15191)

This commit is contained in:
metalgearsloth
2023-04-10 15:37:03 +10:00
committed by GitHub
parent 3178ab83f6
commit 317a4013eb
141 changed files with 3046 additions and 3201 deletions

View File

@@ -10,48 +10,31 @@ namespace Content.Shared.Fluids;
[RegisterComponent, NetworkedComponent]
public sealed class AbsorbentComponent : Component
{
// TODO: Predicted solutions my beloved.
public float Progress;
public const string SolutionName = "absorbed";
public Dictionary<Color, float> Progress = new();
/// <summary>
/// How much solution we can transfer in one interaction.
/// </summary>
[DataField("pickupAmount")]
public FixedPoint2 PickupAmount = FixedPoint2.New(10);
/// <summary>
/// When using this tool on an empty floor tile, leave this much reagent as a new puddle.
/// </summary>
[DataField("residueAmount")]
public FixedPoint2 ResidueAmount = FixedPoint2.New(10); // Should be higher than MopLowerLimit
/// <summary>
/// To leave behind a wet floor, this tool will be unable to take from puddles with a volume less than this
/// amount. This limit is ignored if the target puddle does not evaporate.
/// </summary>
[DataField("lowerLimit")]
public FixedPoint2 LowerLimit = FixedPoint2.New(5);
public FixedPoint2 PickupAmount = FixedPoint2.New(60);
[DataField("pickupSound")]
public SoundSpecifier PickupSound = new SoundPathSpecifier("/Audio/Effects/Fluids/slosh.ogg");
public SoundSpecifier PickupSound = new SoundPathSpecifier("/Audio/Effects/Fluids/watersplash.ogg")
{
Params = AudioParams.Default.WithVariation(0.05f),
};
[DataField("transferSound")]
public SoundSpecifier TransferSound = new SoundPathSpecifier("/Audio/Effects/Fluids/watersplash.ogg");
/// <summary>
/// Quantity of reagent that this mop can pick up per second. Determines the length of the do-after.
/// </summary>
[DataField("speed")] public float Speed = 10;
/// <summary>
/// How many entities can this tool interact with at once?
/// </summary>
[DataField("maxEntities")]
public int MaxInteractingEntities = 1;
/// <summary>
/// What entities is this tool interacting with right now?
/// </summary>
[ViewVariables]
public HashSet<EntityUid> InteractingEntities = new();
[DataField("transferSound")] public SoundSpecifier TransferSound =
new SoundPathSpecifier("/Audio/Effects/Fluids/slosh.ogg")
{
Params = AudioParams.Default.WithVariation(0.05f).WithVolume(-3f),
};
public static readonly SoundSpecifier DefaultTransferSound =
new SoundPathSpecifier("/Audio/Effects/Fluids/slosh.ogg")
{
Params = AudioParams.Default.WithVariation(0.05f).WithVolume(-3f),
};
}