using Content.Shared.Actions.Events;
using Content.Shared.Charges.Components;
using Content.Shared.Examine;
+using Content.Shared.Rejuvenate;
using JetBrains.Annotations;
using Robust.Shared.Timing;
base.Initialize();
SubscribeLocalEvent<LimitedChargesComponent, ExaminedEvent>(OnExamine);
-
+ SubscribeLocalEvent<LimitedChargesComponent, RejuvenateEvent>(OnRejuvenate);
SubscribeLocalEvent<LimitedChargesComponent, ActionAttemptEvent>(OnChargesAttempt);
SubscribeLocalEvent<LimitedChargesComponent, MapInitEvent>(OnChargesMapInit);
SubscribeLocalEvent<LimitedChargesComponent, ActionPerformedEvent>(OnChargesPerformed);
args.PushMarkup(Loc.GetString("limited-charges-recharging", ("seconds", timeRemaining.TotalSeconds.ToString("F1"))));
}
+ private void OnRejuvenate(Entity<LimitedChargesComponent> ent, ref RejuvenateEvent args)
+ {
+ ResetCharges(ent.AsNullable());
+ }
+
private void OnChargesAttempt(Entity<LimitedChargesComponent> ent, ref ActionAttemptEvent args)
{
if (args.Cancelled)