6
2025-12-18 02:55:17 +03:00

52 lines
1.4 KiB
C#

using Content.Shared.Emag.Systems;
using Content.Shared.Tag;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Serialization;
namespace Content.Shared.Emag.Components;
[Access(typeof(EmagSystem))]
[RegisterComponent, NetworkedComponent]
[AutoGenerateComponentState]
public sealed partial class EmagComponent : Component
{
/// <summary>
/// The tag that marks an entity as immune to emags
/// </summary>
[DataField]
[AutoNetworkedField]
public ProtoId<TagPrototype> EmagImmuneTag = "EmagImmune";
// Frontier: demag immunity
/// <summary>
/// The tag that marks an entity as immune to demags
/// </summary>
[DataField]
[AutoNetworkedField]
public ProtoId<TagPrototype> DemagImmuneTag = "DemagImmune";
// End Frontier: demag immunity
/// <summary>
/// What type of emag effect this device will do
/// </summary>
[DataField]
[AutoNetworkedField]
public EmagType EmagType = EmagType.Interaction;
/// <summary>
/// What sound should the emag play when used
/// </summary>
[DataField]
[AutoNetworkedField]
public SoundSpecifier EmagSound = new SoundCollectionSpecifier("sparks");
/// <summary>
/// Frontier - Reverse emags: TODO - extend EmagType
/// </summary>
[DataField("demag")]
public bool Demag = false;
}