DeliverySpawnerComponent.cs 880 B

1234567891011121314151617181920212223242526
  1. using Content.Shared.EntityTable.EntitySelectors;
  2. using Robust.Shared.Audio;
  3. using Robust.Shared.GameStates;
  4. using Robust.Shared.Prototypes;
  5. namespace Content.Shared.Delivery;
  6. /// <summary>
  7. /// Used to mark entities that are valid for spawning deliveries on.
  8. /// If this requires power, it needs to be powered to count as a valid spawner.
  9. /// </summary>
  10. [RegisterComponent, NetworkedComponent]
  11. public sealed partial class DeliverySpawnerComponent : Component
  12. {
  13. /// <summary>
  14. /// The entity table to select deliveries from.
  15. /// </summary>
  16. [DataField(required: true)]
  17. public EntityTableSelector Table = default!;
  18. /// <summary>
  19. /// The sound to play when the spawner spawns a delivery.
  20. /// </summary>
  21. [DataField]
  22. public SoundSpecifier? SpawnSound = new SoundCollectionSpecifier("DeliverySpawnSounds", AudioParams.Default.WithVolume(-7));
  23. }