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>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user