27 lines
1007 B
C#
27 lines
1007 B
C#
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]
|
|
public class ConditionalSpawnerComponent : Component
|
|
{
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField("prototypes", customTypeSerializer:typeof(PrototypeIdListSerializer<EntityPrototype>))]
|
|
public List<string> Prototypes { get; set; } = new();
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField("gameRules", customTypeSerializer:typeof(PrototypeIdListSerializer<GameRulePrototype>))]
|
|
public readonly List<string> GameRules = new();
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField("chance")]
|
|
public float Chance { get; set; } = 1.0f;
|
|
}
|
|
}
|