using Content.Shared.Random; using Robust.Shared.Prototypes; namespace Content.Shared.Silicons.Laws.Components; /// /// During the ion storm event, this entity will have raised on it if it has laws. /// New laws can be modified in multiple ways depending on the fields below. /// [RegisterComponent] public sealed partial class IonStormTargetComponent : Component { /// /// for a random lawset to possibly replace the old one with. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public ProtoId RandomLawsets = "IonStormLawsets"; /// /// Chance for this borg to be affected at all. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float Chance = 0.8f; /// /// Chance to replace the lawset with a random one /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float RandomLawsetChance = 0.25f; /// /// Chance to remove a random law. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float RemoveChance = 0.2f; /// /// Chance to replace a random law with the new one, rather than have it be a glitched-order law. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float ReplaceChance = 0.2f; /// /// Chance to shuffle laws after everything is done. /// [DataField, ViewVariables(VVAccess.ReadWrite)] public float ShuffleChance = 0.2f; } /// /// Raised on an ion storm target to modify its laws. /// [ByRefEvent] public record struct IonStormLawsEvent(SiliconLawset Lawset);