Borg emag tweaks (#19373)

* Laws update

* stun change

* stuntime in component

* history might be fucked
This commit is contained in:
LankLTE
2023-08-23 16:54:59 -07:00
committed by GitHub
parent baf7af05a4
commit b235c06f4e
4 changed files with 36 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
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;
@@ -22,6 +23,18 @@ public sealed partial class EmagSiliconLawComponent : Component
[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.