2023-08-21 07:05:43 +10:00
|
|
|
using Content.Shared.Audio;
|
2022-03-14 16:02:26 -05:00
|
|
|
using Content.Shared.FixedPoint;
|
2022-07-29 14:13:12 +12:00
|
|
|
using Robust.Shared.Audio;
|
2023-02-11 12:38:45 +11:00
|
|
|
using Robust.Shared.GameStates;
|
2025-07-08 23:17:55 -04:00
|
|
|
using Robust.Shared.Prototypes;
|
2022-03-14 16:02:26 -05:00
|
|
|
|
2023-02-11 12:38:45 +11:00
|
|
|
namespace Content.Shared.Fluids;
|
2022-03-14 16:02:26 -05:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// For entities that can clean up puddles
|
|
|
|
|
/// </summary>
|
2025-07-08 23:17:55 -04:00
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class AbsorbentComponent : Component
|
2022-03-14 16:02:26 -05:00
|
|
|
{
|
2025-07-08 23:17:55 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// Used by the client to display a bar showing the reagents contained when held.
|
|
|
|
|
/// Has to still be networked in case the item is given to someone who didn't see a mop in PVS.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField, AutoNetworkedField]
|
|
|
|
|
public Dictionary<Color, float> Progress = [];
|
2022-03-14 16:02:26 -05:00
|
|
|
|
2025-05-26 06:36:16 +03:00
|
|
|
/// <summary>
|
|
|
|
|
/// Name for solution container, that should be used for absorbed solution storage and as source of absorber solution.
|
|
|
|
|
/// Default is 'absorbed'.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public string SolutionName = "absorbed";
|
|
|
|
|
|
2022-03-14 16:02:26 -05:00
|
|
|
/// <summary>
|
2023-04-10 15:37:03 +10:00
|
|
|
/// How much solution we can transfer in one interaction.
|
2022-03-14 16:02:26 -05:00
|
|
|
/// </summary>
|
2025-05-26 06:36:16 +03:00
|
|
|
[DataField]
|
2023-04-23 18:20:03 +10:00
|
|
|
public FixedPoint2 PickupAmount = FixedPoint2.New(100);
|
2022-03-14 16:02:26 -05:00
|
|
|
|
2025-07-08 23:17:55 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// The effect spawned when the puddle fully evaporates.
|
|
|
|
|
/// </summary>
|
2025-05-26 06:36:16 +03:00
|
|
|
[DataField]
|
2025-07-08 23:17:55 -04:00
|
|
|
public EntProtoId MoppedEffect = "PuddleSparkle";
|
2023-04-10 15:37:03 +10:00
|
|
|
|
2025-07-08 23:17:55 -04:00
|
|
|
[DataField]
|
|
|
|
|
public SoundSpecifier PickupSound = new SoundPathSpecifier("/Audio/Effects/Fluids/watersplash.ogg",
|
|
|
|
|
AudioParams.Default.WithVariation(SharedContentAudioSystem.DefaultVariation));
|
|
|
|
|
|
|
|
|
|
[DataField]
|
|
|
|
|
public SoundSpecifier TransferSound = new SoundPathSpecifier("/Audio/Effects/Fluids/slosh.ogg",
|
|
|
|
|
AudioParams.Default.WithVariation(SharedContentAudioSystem.DefaultVariation).WithVolume(-3f));
|
2023-04-10 15:37:03 +10:00
|
|
|
|
|
|
|
|
public static readonly SoundSpecifier DefaultTransferSound =
|
2025-07-08 23:17:55 -04:00
|
|
|
new SoundPathSpecifier("/Audio/Effects/Fluids/slosh.ogg",
|
|
|
|
|
AudioParams.Default.WithVariation(SharedContentAudioSystem.DefaultVariation).WithVolume(-3f));
|
2025-05-26 06:36:16 +03:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Marker that absorbent component owner should try to use 'absorber solution' to replace solution to be absorbed.
|
|
|
|
|
/// Target solution will be simply consumed into container if set to false.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public bool UseAbsorberSolution = true;
|
2022-03-14 16:02:26 -05:00
|
|
|
}
|