Added display for amount of hits left in stun batons/stun prods. (#25141)
Added display for amount of hits left in stun batons/stunprods. Co-authored-by: Plykiya <plykiya@protonmail.com> (cherry picked from commit 5f2cc18be77010962b94bbeb969ee06ba43f655d)
This commit is contained in:
parent
df496a6d5d
commit
4f434db79c
|
|
@ -48,6 +48,12 @@ namespace Content.Server.Stunnable.Systems
|
|||
? Loc.GetString("comp-stunbaton-examined-on")
|
||||
: Loc.GetString("comp-stunbaton-examined-off");
|
||||
args.PushMarkup(onMsg);
|
||||
|
||||
if (TryComp<BatteryComponent>(entity.Owner, out var battery))
|
||||
{
|
||||
var count = (int) (battery.CurrentCharge / entity.Comp.EnergyPerUse);
|
||||
args.PushMarkup(Loc.GetString("melee-battery-examine", ("color", "yellow"), ("count", count)));
|
||||
}
|
||||
}
|
||||
|
||||
private void ToggleDone(Entity<StunbatonComponent> entity, ref ItemToggledEvent args)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
melee-inject-failed-hardsuit = Your {$weapon} cannot inject through hardsuits!
|
||||
|
||||
melee-balloon-pop = {CAPITALIZE(THE($balloon))} popped!
|
||||
|
||||
|
||||
#BatteryComponent
|
||||
melee-battery-examine = It has enough charge for [color={$color}]{$count}[/color] hits.
|
||||
|
|
|
|||
Loading…
Reference in New Issue