using Content.Shared.RCD.Systems; using Robust.Shared.Audio; using Robust.Shared.GameStates; using Robust.Shared.Physics; using Robust.Shared.Prototypes; namespace Content.Shared.RCD.Components; /// /// Main component for the RCD /// Optionally uses LimitedChargesComponent. /// Charges can be refilled with RCD ammo /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] [Access(typeof(RCDSystem))] public sealed partial class RCDComponent : Component { /// /// List of RCD prototypes that the device comes loaded with /// [DataField, AutoNetworkedField] public HashSet> AvailablePrototypes { get; set; } = new(); /// /// Sound that plays when a RCD operation successfully completes /// [DataField] public SoundSpecifier SuccessSound { get; set; } = new SoundPathSpecifier("/Audio/Items/deconstruct.ogg"); /// /// The ProtoId of the currently selected RCD prototype /// [DataField, AutoNetworkedField] public ProtoId ProtoId { get; set; } = "Invalid"; /// /// The direction constructed entities will face upon spawning /// [DataField, AutoNetworkedField] public Direction ConstructionDirection { get => _constructionDirection; set { _constructionDirection = value; ConstructionTransform = new Transform(new(), _constructionDirection.ToAngle()); } } private Direction _constructionDirection = Direction.South; /// /// Returns a rotated transform based on the specified ConstructionDirection /// /// /// Contains no position data /// [ViewVariables(VVAccess.ReadOnly)] public Transform ConstructionTransform { get; private set; } }