Files
tbd-station-14/Content.Shared/Silicons/Laws/Components/EmagSiliconLawComponent.cs
LankLTE b235c06f4e Borg emag tweaks (#19373)
* Laws update

* stun change

* stuntime in component

* history might be fucked
2023-08-23 19:54:59 -04:00

45 lines
1.7 KiB
C#

using Content.Shared.Roles;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
namespace Content.Shared.Silicons.Laws.Components;
/// <summary>
/// This is used for an entity that grants a special "obey" law when emagge.d
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(SharedSiliconLawSystem))]
public sealed partial class EmagSiliconLawComponent : Component
{
/// <summary>
/// The name of the person who emagged this law provider.
/// </summary>
[DataField("ownerName"), ViewVariables(VVAccess.ReadWrite)]
public string? OwnerName;
/// <summary>
/// Does the panel need to be open to EMAG this law provider.
/// </summary>
[DataField("requireOpenPanel"), ViewVariables(VVAccess.ReadWrite)]
public bool RequireOpenPanel = true;
/// <summary>
/// The laws that the borg is given when emagged.
/// </summary>
[DataField("emagLaws", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer<SiliconLawPrototype>))]
public List<string> EmagLaws = new();
/// <summary>
/// How long the borg is stunned when it's emagged. Setting to 0 will disable it.
/// </summary>
[DataField("stunTime"), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan StunTime = TimeSpan.Zero;
/// <summary>
/// A role given to entities with this component when they are emagged.
/// Mostly just for admin purposes.
/// </summary>
[DataField("antagonistRole", customTypeSerializer: typeof(PrototypeIdSerializer<AntagPrototype>))]
public string? AntagonistRole = "SubvertedSilicon";
}