2020-06-05 19:42:43 +02:00
|
|
|
using System.Collections.Generic;
|
2021-12-21 21:23:29 +01:00
|
|
|
using Content.Server.GameTicking.Rules;
|
2020-06-05 19:42:43 +02:00
|
|
|
using Robust.Shared.GameObjects;
|
2021-12-21 21:23:29 +01:00
|
|
|
using Robust.Shared.Prototypes;
|
2021-03-05 01:08:38 +01:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2021-12-21 21:23:29 +01:00
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
2020-06-05 19:42:43 +02:00
|
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Spawners.Components
|
2020-06-05 19:42:43 +02:00
|
|
|
{
|
2022-02-08 00:42:49 -08:00
|
|
|
[RegisterComponent]
|
2022-02-16 00:23:23 -07:00
|
|
|
[Virtual]
|
2022-01-31 17:36:49 +11:00
|
|
|
public class ConditionalSpawnerComponent : Component
|
2020-06-05 19:42:43 +02:00
|
|
|
{
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2021-12-21 21:23:29 +01:00
|
|
|
[DataField("prototypes", customTypeSerializer:typeof(PrototypeIdListSerializer<EntityPrototype>))]
|
2020-11-27 11:00:49 +01:00
|
|
|
public List<string> Prototypes { get; set; } = new();
|
2020-06-05 19:42:43 +02:00
|
|
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2021-12-21 21:23:29 +01:00
|
|
|
[DataField("gameRules", customTypeSerializer:typeof(PrototypeIdListSerializer<GameRulePrototype>))]
|
2022-01-31 17:36:49 +11:00
|
|
|
public readonly List<string> GameRules = new();
|
2020-06-05 19:42:43 +02:00
|
|
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("chance")]
|
2020-06-05 19:42:43 +02:00
|
|
|
public float Chance { get; set; } = 1.0f;
|
|
|
|
|
}
|
|
|
|
|
}
|