mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-10 10:51:14 +03:00
* code stuff * fix error * now its fixed * use the charge from the arg * only on battery full * remove whitespace Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * use default! instead of null! Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * use set charge --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
25 lines
685 B
C#
25 lines
685 B
C#
using Content.Shared.EntityTable.EntitySelectors;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Server.Power.Components;
|
|
|
|
/// <summary>
|
|
/// Spawns a entity when the battery reaches max charge.
|
|
/// It also consumes all power when spawning the entity.
|
|
/// </summary>
|
|
[RegisterComponent]
|
|
public sealed partial class SpawnOnBatteryFullComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// A entity proto to spawn.
|
|
/// </summary>
|
|
/// <remarks>Takes priority over <see cref="Table"/></remarks>
|
|
[DataField]
|
|
public EntProtoId? Proto;
|
|
|
|
/// <summary>
|
|
/// A entity table to spawn stuff from.
|
|
/// </summary>
|
|
[DataField]
|
|
public EntityTableSelector? Table;
|
|
}
|