CatStation/Content.Shared/Item/ItemToggle/Components/ItemToggleRequiresChargeComponent.cs
Winkarst b0026453c4
Refactor: Split `StunbatonComponent` into generic components (#44870)
* Refactor

* Update

* Rename

* Update prototypes

* Fix OnCollide

* Review

* Update

* Cleanup

* Update

* Update

* Update

* Cleanup

* Missed
2026-08-14 18:19:10 +00:00

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";
}