More feedback for emag recharging (#6835)

This commit is contained in:
Rane
2022-02-22 00:18:07 -05:00
committed by GitHub
parent 7f6fce8536
commit 705999f779
2 changed files with 10 additions and 1 deletions

View File

@@ -27,7 +27,14 @@ namespace Content.Shared.Emag.Systems
private void OnExamine(EntityUid uid, EmagComponent component, ExaminedEvent args)
{
float timeRemaining = component.RechargeTime - component.Accumulator;
args.PushMarkup(Loc.GetString("emag-charges-remaining", ("charges", component.Charges)));
if (component.Charges == component.MaxCharges)
{
args.PushMarkup(Loc.GetString("emag-max-charges"));
return;
}
args.PushMarkup(Loc.GetString("emag-recharging", ("seconds", Math.Round(timeRemaining))));
}
private void OnAfterInteract(EntityUid uid, EmagComponent component, AfterInteractEvent args)

View File

@@ -1,3 +1,5 @@
emag-success = The card zaps something in {THE($target)}.
emag-no-charges = No charges left!
emag-charges-remaining = It has {$charges} charges remaining.
emag-charges-remaining = It has [color=fuchsia]{$charges}[/color] charges remaining.
emag-max-charges = It's at [color=green]maximum[/color] charges.
emag-recharging = There are [color=yellow]{$seconds}[/color] seconds left until the next charge.