Ion storm event (#20277)
* ion storm event prototype + locale * add lawsets * use lawsets, make borgs ion storm targets * ion storm rule and ion storm target * lawset prototype * use lawsets * update silicon law system to use lawsets and support ion storm event * new toys * fix * more fix * fixy * ion storm admin logging * assigning laws makes borg provide its own laws, other stuff * 1h reoccurence * 50% chance * better call saul * emagLaws is required * add announcment audio * fixy * family friendly gaming * fixy * address reviews * fixy * more fixy and no erp * pro --------- Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
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;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared.Silicons.Laws.Components;
|
||||
|
||||
/// <summary>
|
||||
/// This is used for an entity that grants a special "obey" law when emagge.d
|
||||
/// This is used for an entity that grants a special "obey" law when emagged.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent, Access(typeof(SharedSiliconLawSystem))]
|
||||
public sealed partial class EmagSiliconLawComponent : Component
|
||||
@@ -14,31 +13,39 @@ public sealed partial class EmagSiliconLawComponent : Component
|
||||
/// <summary>
|
||||
/// The name of the person who emagged this law provider.
|
||||
/// </summary>
|
||||
[DataField("ownerName"), ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField, 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)]
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool RequireOpenPanel = true;
|
||||
|
||||
/// <summary>
|
||||
/// The laws that the borg is given when emagged.
|
||||
/// The laws that the borg is given when emagged.
|
||||
/// Law 0 is prepended to this, so this can only include the static laws.
|
||||
/// </summary>
|
||||
[DataField("emagLaws", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer<SiliconLawPrototype>))]
|
||||
public List<string> EmagLaws = new();
|
||||
[DataField(required: true), ViewVariables(VVAccess.ReadWrite)]
|
||||
public ProtoId<SiliconLawsetPrototype> EmagLaws = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// How long the borg is stunned when it's emagged. Setting to 0 will disable it.
|
||||
/// Lawset created from the prototype id and law 0.
|
||||
/// Cached when getting laws and only modified during an ion storm event.
|
||||
/// </summary>
|
||||
[DataField("stunTime"), ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public SiliconLawset? Lawset;
|
||||
|
||||
/// <summary>
|
||||
/// How long the borg is stunned when it's emagged. Setting to 0 will disable it.
|
||||
/// </summary>
|
||||
[DataField, 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";
|
||||
[DataField]
|
||||
public ProtoId<AntagPrototype>? AntagonistRole = "SubvertedSilicon";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user