2022-01-30 07:42:15 -07:00
|
|
|
using Content.Server.Fluids.EntitySystems;
|
2021-11-03 16:48:03 -07:00
|
|
|
using Content.Shared.FixedPoint;
|
2021-07-10 17:35:33 +02:00
|
|
|
using Content.Shared.Sound;
|
2022-01-30 07:42:15 -07:00
|
|
|
using Robust.Shared.Analyzers;
|
2020-08-08 14:33:36 +02:00
|
|
|
using Robust.Shared.GameObjects;
|
2021-12-30 00:48:18 +11:00
|
|
|
using Robust.Shared.Prototypes;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2021-12-30 00:48:18 +11:00
|
|
|
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]
|
|
|
|
|
[Friend(typeof(SpraySystem))]
|
|
|
|
|
public sealed class SprayComponent : Component
|
|
|
|
|
{
|
|
|
|
|
public const string SolutionName = "spray";
|
2020-09-21 17:51:07 +02:00
|
|
|
|
2022-01-30 07:42:15 -07:00
|
|
|
[DataField("sprayDistance")] public float SprayDistance = 3f;
|
2020-08-08 14:33:36 +02:00
|
|
|
|
2022-01-30 07:42:15 -07:00
|
|
|
[DataField("transferAmount")] public FixedPoint2 TransferAmount = FixedPoint2.New(10);
|
2020-09-21 17:51:07 +02:00
|
|
|
|
2022-01-30 07:42:15 -07:00
|
|
|
[DataField("sprayVelocity")] public float SprayVelocity = 1.5f;
|
2020-09-21 17:51:07 +02:00
|
|
|
|
2022-01-30 07:42:15 -07:00
|
|
|
[DataField("sprayAliveTime")] public float SprayAliveTime = 0.75f;
|
2020-09-21 17:51:07 +02:00
|
|
|
|
2022-01-30 07:42:15 -07:00
|
|
|
[DataField("cooldownTime")] public float CooldownTime = 0.5f;
|
2021-05-04 13:37:23 +02:00
|
|
|
|
2022-01-30 07:42:15 -07:00
|
|
|
[DataField("sprayedPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
|
|
|
|
public string SprayedPrototype = "Vapor";
|
2020-08-08 14:33:36 +02:00
|
|
|
|
2022-01-30 07:42:15 -07:00
|
|
|
[DataField("vaporAmount")] public int VaporAmount = 1;
|
2020-09-21 17:51:07 +02:00
|
|
|
|
2022-01-30 07:42:15 -07:00
|
|
|
[DataField("vaporSpread")] public float VaporSpread = 90f;
|
2020-09-21 17:51:07 +02:00
|
|
|
|
2022-01-30 07:42:15 -07:00
|
|
|
[DataField("impulse")] public float Impulse;
|
2021-02-03 14:05:31 +01:00
|
|
|
|
2022-01-30 07:42:15 -07:00
|
|
|
[DataField("spraySound", required: true)]
|
|
|
|
|
public SoundSpecifier SpraySound { get; } = default!;
|
2020-08-08 14:33:36 +02:00
|
|
|
}
|