using Content.Shared.DeviceLinking; using Robust.Shared.Audio; using Robust.Shared.Prototypes; namespace Content.Server.EnergyDome; /// /// component, allows an entity to generate a battery-powered energy dome of a specific type. /// [RegisterComponent, Access(typeof(EnergyDomeSystem))] //Access add public sealed partial class EnergyDomeGeneratorComponent : Component { [DataField] public bool Enabled = false; /// /// How much energy will be spent from the battery per unit of damage taken by the shield. /// [DataField] public float DamageEnergyDraw = 10f; /// /// Whether or not the dome can be toggled via standard interactions /// (alt verbs, using in hand, etc) /// [DataField] public bool CanInteractUse = true; /// /// Can the NetworkDevice system activate and deactivate the barrier? /// [DataField] public bool CanDeviceNetworkUse = false; //Dome [DataField, ViewVariables(VVAccess.ReadWrite)] public EntProtoId DomePrototype = "EnergyDomeSmallRed"; [DataField] public EntityUid? SpawnedDome; /// /// the entity on which the shield will be hung. This is either the container containing /// the item or the item itself. Determined when the shield is activated, /// it is stored in the component for changing the protected entity. /// [DataField] public EntityUid? DomeParentEntity; //Action [DataField] public EntProtoId ToggleAction = "ActionToggleDome"; [DataField] public EntityUid? ToggleActionEntity; //Sounds [DataField] public SoundSpecifier AccessDeniedSound = new SoundPathSpecifier("/Audio/Machines/custom_deny.ogg"); [DataField] public SoundSpecifier TurnOnSound = new SoundPathSpecifier("/Audio/Machines/anomaly_sync_connect.ogg"); [DataField] public SoundSpecifier EnergyOutSound = new SoundPathSpecifier("/Audio/Machines/energyshield_down.ogg"); [DataField] public SoundSpecifier TurnOffSound = new SoundPathSpecifier("/Audio/Machines/button.ogg"); [DataField] public SoundSpecifier ParrySound = new SoundPathSpecifier("/Audio/Machines/energyshield_parry.ogg") { Params = AudioParams.Default.WithVariation(0.05f) }; //Ports [DataField] public ProtoId TogglePort = "Toggle"; [DataField] public ProtoId OnPort = "On"; [DataField] public ProtoId OffPort = "Off"; }