2022-01-30 07:42:15 -07:00
|
|
|
using Content.Server.Fluids.EntitySystems;
|
2023-06-03 15:31:50 -04:00
|
|
|
using Content.Shared.FixedPoint;
|
2022-07-29 14:13:12 +12:00
|
|
|
using Robust.Shared.Audio;
|
2021-12-30 00:48:18 +11:00
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
2020-08-08 14:33:36 +02:00
|
|
|
|
2022-01-30 07:42:15 -07:00
|
|
|
namespace Content.Server.Fluids.Components;
|
2020-09-21 17:51:07 +02:00
|
|
|
|
2022-01-30 07:42:15 -07:00
|
|
|
[RegisterComponent]
|
2022-06-07 15:26:28 +02:00
|
|
|
[Access(typeof(SpraySystem))]
|
2022-01-30 07:42:15 -07:00
|
|
|
public sealed class SprayComponent : Component
|
|
|
|
|
{
|
|
|
|
|
public const string SolutionName = "spray";
|
2020-09-21 17:51:07 +02:00
|
|
|
|
2023-06-03 15:31:50 -04:00
|
|
|
[DataField("transferAmount")]
|
|
|
|
|
public FixedPoint2 TransferAmount = 10;
|
|
|
|
|
|
2023-05-02 00:25:33 +10:00
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("sprayDistance")]
|
|
|
|
|
public float SprayDistance = 3.5f;
|
2020-08-08 14:33:36 +02:00
|
|
|
|
2023-05-02 00:25:33 +10:00
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("sprayVelocity")]
|
|
|
|
|
public float SprayVelocity = 3.5f;
|
2020-09-21 17:51:07 +02:00
|
|
|
|
2023-05-02 00:25:33 +10:00
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("sprayedPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
2022-01-30 07:42:15 -07:00
|
|
|
public string SprayedPrototype = "Vapor";
|
2020-08-08 14:33:36 +02:00
|
|
|
|
2023-05-02 00:25:33 +10:00
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("vaporAmount")]
|
|
|
|
|
public int VaporAmount = 1;
|
2020-09-21 17:51:07 +02:00
|
|
|
|
2023-05-02 00:25:33 +10:00
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("vaporSpread")]
|
|
|
|
|
public float VaporSpread = 90f;
|
2021-02-03 14:05:31 +01:00
|
|
|
|
2023-05-02 00:25:33 +10:00
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("spraySound", required: true)]
|
2022-06-07 15:26:28 +02:00
|
|
|
[Access(typeof(SpraySystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends
|
2022-01-30 07:42:15 -07:00
|
|
|
public SoundSpecifier SpraySound { get; } = default!;
|
2020-08-08 14:33:36 +02:00
|
|
|
}
|