2023-05-28 18:14:06 +02:00
|
|
|
|
using Content.Server.DeviceLinking.Systems;
|
|
|
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.DeviceLinking.Components.Overload;
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Spawns an entity when a device link overloads.
|
|
|
|
|
|
/// An overload happens when a device link sink is invoked to many times per tick
|
|
|
|
|
|
/// and it raises a <see cref="Content.Server.DeviceLinking.Events.DeviceLinkOverloadedEvent"/>
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[RegisterComponent]
|
|
|
|
|
|
[Access(typeof(DeviceLinkOverloadSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
|
public sealed partial class SpawnOnOverloadComponent : Component
|
2023-05-28 18:14:06 +02:00
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The entity prototype to spawn when the device overloads
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[DataField("spawnedPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
|
|
|
|
|
public string Prototype = "PuddleSparkle";
|
|
|
|
|
|
}
|