mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-18 14:41:17 +03:00
* ActionRestrictions * katana use ActionGrant/ItemActionGrant * TeleportAction * no more DashAbility * no more TeleportSpell * no more EnergyKatana * cleanup * fix whitelist and popup * docs * display recharge cooldown * refactor: whitespace consistency!111 * Revert "display recharge cooldown" This reverts commit 3b93b179 * popup for limited charges * maybe fix * no more CanUseCharge * upd * better? * refactor: using _SharedPhysicsSystem for TeleportActionSystem collision detection + small refactoring * refactor: xml-doc --------- Co-authored-by: Fildrance <fildrance@gmail.com>
33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using Content.Shared.Charges.Systems;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
|
|
|
namespace Content.Shared.Charges.Components;
|
|
|
|
/// <summary>
|
|
/// Specifies the attached action has discrete charges, separate to a cooldown.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(SharedChargesSystem))]
|
|
public sealed partial class LimitedChargesComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Localization ID of the popup shown when the entity has no charges left.
|
|
/// </summary>
|
|
[DataField]
|
|
public LocId? OnFailPopup;
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public int LastCharges;
|
|
|
|
/// <summary>
|
|
/// The max charges this action has.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public int MaxCharges = 3;
|
|
|
|
/// <summary>
|
|
/// Last time charges was changed. Used to derive current charges.
|
|
/// </summary>
|
|
[DataField(customTypeSerializer:typeof(TimeOffsetSerializer)), AutoNetworkedField]
|
|
public TimeSpan LastUpdate;
|
|
}
|