mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-10 10:51:14 +03:00
* Refactor * Update * Rename * Update prototypes * Fix OnCollide * Review * Update * Cleanup * Update * Update * Update * Cleanup * Missed
23 lines
875 B
C#
23 lines
875 B
C#
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared.Item.ItemToggle.Components;
|
|
|
|
/// <summary>
|
|
/// With this component, <see cref="ItemToggleComponent"/> will not toggle and will be toggled off automatically if battery charge is below the required value.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
[Access(typeof(ItemToggleSystem))]
|
|
public sealed partial class ItemToggleRequiresChargeComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The amount of battery charge required to function.
|
|
/// </summary>
|
|
[DataField(required: true), AutoNetworkedField]
|
|
public float RequiredCharge;
|
|
|
|
/// <summary>
|
|
/// The popup to show if someone tries to toggle the item on, but there is not enough charge.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public LocId FailPopup = "item-toggle-activated-low-charge";
|
|
}
|