Files
tbd-station-14/Content.Server/RCD/Components/RCDComponent.cs
metalgearsloth bba096f1a4 RCD logs (#7208)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
2022-03-23 13:02:49 +11:00

50 lines
1.4 KiB
C#

using System.Threading;
using Content.Shared.Sound;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Server.RCD.Components
{
public enum RcdMode : byte
{
Floors,
Walls,
Airlock,
Deconstruct
}
[RegisterComponent]
public sealed class RCDComponent : Component
{
private const int DefaultAmmoCount = 5;
[ViewVariables(VVAccess.ReadOnly)]
[DataField("maxAmmo")] public int MaxAmmo = DefaultAmmoCount;
[ViewVariables(VVAccess.ReadWrite)] [DataField("delay")]
public float Delay = 2f;
[DataField("swapModeSound")]
public SoundSpecifier SwapModeSound = new SoundPathSpecifier("/Audio/Items/genhit.ogg");
[DataField("successSound")]
public SoundSpecifier SuccessSound = new SoundPathSpecifier("/Audio/Items/deconstruct.ogg");
/// <summary>
/// What mode are we on? Can be floors, walls, deconstruct.
/// </summary>
[ViewVariables]
[DataField("mode")]
public RcdMode Mode = RcdMode.Floors;
/// <summary>
/// How much "ammo" we have left. You can refill this with RCD ammo.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)] [DataField("ammo")]
public int CurrentAmmo = DefaultAmmoCount;
public CancellationTokenSource? CancelToken = null;
}
}