Prevent infinite loops in device linking (#16856)
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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))]
|
||||
public sealed class SpawnOnOverloadComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity prototype to spawn when the device overloads
|
||||
/// </summary>
|
||||
[DataField("spawnedPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string Prototype = "PuddleSparkle";
|
||||
}
|
||||
Reference in New Issue
Block a user