using Robust.Shared.Prototypes;
namespace Content.Shared.EntityTable.EntitySelectors;
///
/// Gets the spawns from the entity table prototype specified.
/// Can be used to reuse common tables.
///
public sealed partial class NestedSelector : EntityTableSelector
{
[DataField(required: true)]
public ProtoId TableId;
protected override IEnumerable GetSpawnsImplementation(System.Random rand,
IEntityManager entMan,
IPrototypeManager proto,
EntityTableContext ctx)
{
return proto.Index(TableId).Table.GetSpawns(rand, entMan, proto, ctx);
}
protected override IEnumerable<(EntProtoId spawn, double)> ListSpawnsImplementation(IEntityManager entMan, IPrototypeManager proto, EntityTableContext ctx)
{
return proto.Index(TableId).Table.ListSpawns(entMan, proto, ctx);
}
protected override IEnumerable<(EntProtoId spawn, double)> AverageSpawnsImplementation(IEntityManager entMan, IPrototypeManager proto, EntityTableContext ctx)
{
return proto.Index(TableId).Table.AverageSpawns(entMan, proto, ctx);
}
}