1
0

NestedSelector.cs 613 B

1234567891011121314151617181920
  1. using Robust.Shared.Prototypes;
  2. namespace Content.Shared.EntityTable.EntitySelectors;
  3. /// <summary>
  4. /// Gets the spawns from the entity table prototype specified.
  5. /// Can be used to reuse common tables.
  6. /// </summary>
  7. public sealed partial class NestedSelector : EntityTableSelector
  8. {
  9. [DataField(required: true)]
  10. public ProtoId<EntityTablePrototype> TableId;
  11. protected override IEnumerable<EntProtoId> GetSpawnsImplementation(System.Random rand,
  12. IEntityManager entMan,
  13. IPrototypeManager proto)
  14. {
  15. return proto.Index(TableId).Table.GetSpawns(rand, entMan, proto);
  16. }
  17. }