using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Content.Shared.Physics; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; using Robust.Shared.GameStates; namespace Content.Shared.Singularity.Components; [RegisterComponent, AutoGenerateComponentPause, NetworkedComponent, AutoGenerateComponentState] public sealed partial class SingularityGeneratorComponent : Component { /// /// The amount of power this generator has accumulated. /// If you want to set this use /// [DataField] public float Power = 0; /// /// The power threshold at which this generator will spawn a singularity. /// If you want to set this use /// [DataField] public float Threshold = 16; /// /// An inert generator will never be charged by particles, even if emagged. /// This is normally only used between activating and being destroyed, to avoid creating duplicate teslas. /// [DataField] public bool Inert; /// /// Allows the generator to ignore all the failsafe stuff, e.g. when emagged /// [DataField, AutoNetworkedField] public bool FailsafeDisabled = false; /// /// Maximum distance at which the generator will check for a field at /// [DataField] public float FailsafeDistance = 16; /// /// The prototype ID used to spawn a singularity. /// [DataField("spawnId", customTypeSerializer: typeof(PrototypeIdSerializer))] public string? SpawnPrototype = "Singularity"; /// /// The masks the raycast should not go through /// [DataField] public int CollisionMask = (int)CollisionGroup.FullTileMask; /// /// Message to use when there's no containment field on cardinal directions /// [DataField] public LocId ContainmentFailsafeMessage = "comp-generator-failsafe"; /// /// For how long the failsafe will cause the generator to stop working and not issue a failsafe warning /// [DataField] public TimeSpan FailsafeCooldown = TimeSpan.FromSeconds(10); /// /// How long until the generator can issue a failsafe warning again /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] [AutoPausedField] public TimeSpan NextFailsafe = TimeSpan.Zero; }