mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-30 16:17:27 +00:00
* push * fix * push * abstract and more accurate * new abstract method I guess * that table does not explode * webedit major * Update Content.Shared/EntityTable/ValueSelector/BinomialNumberSelector.cs Co-authored-by: SnappingOpossum <snappingopossum@outlook.com> * big ass merge conflicts * sadas * review --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com> Co-authored-by: Tayrtahn <tayrtahn@gmail.com> Co-authored-by: SnappingOpossum <snappingopossum@outlook.com>
32 lines
1.1 KiB
C#
32 lines
1.1 KiB
C#
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,
|
|
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);
|
|
}
|
|
}
|