using System.Collections.Generic; using Content.Server.GameTicking.Rules; using Robust.Shared.GameObjects; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; using Robust.Shared.ViewVariables; namespace Content.Server.Spawners.Components { [RegisterComponent, ComponentProtoName("ConditionalSpawner")] public class ConditionalSpawnerComponent : Component { [ViewVariables(VVAccess.ReadWrite)] [DataField("prototypes", customTypeSerializer:typeof(PrototypeIdListSerializer))] public List Prototypes { get; set; } = new(); [ViewVariables(VVAccess.ReadWrite)] [DataField("gameRules", customTypeSerializer:typeof(PrototypeIdListSerializer))] public readonly List GameRules = new(); [ViewVariables(VVAccess.ReadWrite)] [DataField("chance")] public float Chance { get; set; } = 1.0f; } }