2024-08-09 22:12:40 -04:00
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.EntityTable.EntitySelectors;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the spawns from the entity table prototype specified.
|
|
|
|
|
/// Can be used to reuse common tables.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public sealed partial class NestedSelector : EntityTableSelector
|
|
|
|
|
{
|
|
|
|
|
[DataField(required: true)]
|
|
|
|
|
public ProtoId<EntityTablePrototype> TableId;
|
|
|
|
|
|
|
|
|
|
protected override IEnumerable<EntProtoId> GetSpawnsImplementation(System.Random rand,
|
|
|
|
|
IEntityManager entMan,
|
2025-05-31 09:40:25 -04:00
|
|
|
IPrototypeManager proto,
|
|
|
|
|
EntityTableContext ctx)
|
2024-08-09 22:12:40 -04:00
|
|
|
{
|
2025-05-31 09:40:25 -04:00
|
|
|
return proto.Index(TableId).Table.GetSpawns(rand, entMan, proto, ctx);
|
2024-08-09 22:12:40 -04:00
|
|
|
}
|
|
|
|
|
}
|