1
0

SpawnOnOverloadComponent.cs 869 B

123456789101112131415161718192021
  1. using Content.Server.DeviceLinking.Systems;
  2. using Robust.Shared.Prototypes;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
  4. namespace Content.Server.DeviceLinking.Components.Overload;
  5. /// <summary>
  6. /// Spawns an entity when a device link overloads.
  7. /// An overload happens when a device link sink is invoked to many times per tick
  8. /// and it raises a <see cref="Content.Server.DeviceLinking.Events.DeviceLinkOverloadedEvent"/>
  9. /// </summary>
  10. [RegisterComponent]
  11. [Access(typeof(DeviceLinkOverloadSystem))]
  12. public sealed partial class SpawnOnOverloadComponent : Component
  13. {
  14. /// <summary>
  15. /// The entity prototype to spawn when the device overloads
  16. /// </summary>
  17. [DataField("spawnedPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
  18. public string Prototype = "PuddleSparkle";
  19. }