RandomSpawnRuleComponent.cs 677 B

123456789101112131415161718
  1. using Content.Server.StationEvents.Events;
  2. using Robust.Shared.Prototypes;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  4. namespace Content.Server.StationEvents.Components;
  5. /// <summary>
  6. /// Spawns a single entity at a random tile on a station using TryGetRandomTile.
  7. /// </summary>
  8. [RegisterComponent, Access(typeof(RandomSpawnRule))]
  9. public sealed partial class RandomSpawnRuleComponent : Component
  10. {
  11. /// <summary>
  12. /// The entity to be spawned.
  13. /// </summary>
  14. [DataField("prototype", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
  15. public string Prototype = string.Empty;
  16. }