2023-11-20 16:36:25 +01:00
|
|
|
using Content.Shared.Roles;
|
2023-08-14 19:34:23 -04:00
|
|
|
using Robust.Shared.GameStates;
|
2023-10-27 03:40:13 +01:00
|
|
|
using Robust.Shared.Prototypes;
|
2023-11-20 16:36:25 +01:00
|
|
|
using Robust.Shared.Audio;
|
2023-08-14 19:34:23 -04:00
|
|
|
|
|
|
|
|
namespace Content.Shared.Silicons.Laws.Components;
|
2023-08-12 17:39:58 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
2023-10-27 03:40:13 +01:00
|
|
|
/// This is used for an entity that grants a special "obey" law when emagged.
|
2023-08-12 17:39:58 -04:00
|
|
|
/// </summary>
|
2023-08-14 19:34:23 -04:00
|
|
|
[RegisterComponent, NetworkedComponent, Access(typeof(SharedSiliconLawSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class EmagSiliconLawComponent : Component
|
2023-08-12 17:39:58 -04:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The name of the person who emagged this law provider.
|
|
|
|
|
/// </summary>
|
2023-10-27 03:40:13 +01:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
2023-08-12 17:39:58 -04:00
|
|
|
public string? OwnerName;
|
2023-08-14 19:34:23 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Does the panel need to be open to EMAG this law provider.
|
|
|
|
|
/// </summary>
|
2023-10-27 03:40:13 +01:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
2023-08-14 19:34:23 -04:00
|
|
|
public bool RequireOpenPanel = true;
|
|
|
|
|
|
2023-10-27 03:40:13 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// How long the borg is stunned when it's emagged. Setting to 0 will disable it.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
2023-08-23 16:54:59 -07:00
|
|
|
public TimeSpan StunTime = TimeSpan.Zero;
|
|
|
|
|
|
2023-08-14 19:34:23 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// A role given to entities with this component when they are emagged.
|
|
|
|
|
/// Mostly just for admin purposes.
|
|
|
|
|
/// </summary>
|
2023-10-27 03:40:13 +01:00
|
|
|
[DataField]
|
|
|
|
|
public ProtoId<AntagPrototype>? AntagonistRole = "SubvertedSilicon";
|
2023-11-20 16:36:25 +01:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The sound that plays for the borg player
|
|
|
|
|
/// to let them know they've been emagged
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public SoundSpecifier EmaggedSound = new SoundPathSpecifier("/Audio/Ambience/Antag/emagged_borg.ogg");
|
|
|
|
|
|
2023-08-12 17:39:58 -04:00
|
|
|
}
|