Files
crystall-punk-14/Content.Server/_CP14/PVS/CP14ConstrainedSpawnerOnTriggerComponent.cs
Ed 1ac9ec85c5 Some mobs pvs-based systems (#321)
* outPVS despawn component

* Update CP14HelperPvsSystem.cs

* experimental constrained spawners
2024-07-09 23:05:19 +03:00

26 lines
633 B
C#

using Content.Server._CP14.PVS;
using Robust.Shared.Prototypes;
namespace MyNamespace;
/// <summary>
/// A spawner that clearly controls how many entities it can spawn.
/// </summary>
[RegisterComponent, Access(typeof(CP14ConstrainSpawnerSystem))]
public sealed partial class CP14ConstrainedSpawnerOnTriggerComponent : Component
{
[DataField]
public List<EntProtoId> Prototypes { get; set; } = new();
public HashSet<EntityUid> Spawned = new();
[DataField]
public float Chance { get; set; } = 1.0f;
[DataField]
public float Offset { get; set; } = 0.2f;
[DataField]
public int MaxCount = 1;
}