diff --git a/Content.Shared/EntityList/EntityLootTablePrototype.cs b/Content.Shared/EntityList/EntityLootTablePrototype.cs new file mode 100644 index 0000000000..8b61543fbc --- /dev/null +++ b/Content.Shared/EntityList/EntityLootTablePrototype.cs @@ -0,0 +1,22 @@ +using System.Collections.Immutable; +using Content.Shared.Storage; +using Robust.Shared.Prototypes; +using Robust.Shared.Random; + +namespace Content.Shared.EntityList; + +[Prototype("entityLootTable")] +public sealed class EntityLootTablePrototype : IPrototype +{ + [IdDataField] + public string ID { get; } = default!; + + [DataField("entries")] + public ImmutableList Entries = ImmutableList.Empty; + + /// + public List GetSpawns(IRobustRandom? random = null) + { + return EntitySpawnCollection.GetSpawns(Entries, random); + } +}