From: Plykiya <58439124+Plykiya@users.noreply.github.com> Date: Mon, 12 Feb 2024 06:36:06 +0000 (-0800) Subject: Added display for amount of hits left in stun batons/stun prods. (#25141) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=5f2cc18be77010962b94bbeb969ee06ba43f655d;p=space-station-14.git 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 --- diff --git a/Content.Server/Stunnable/Systems/StunbatonSystem.cs b/Content.Server/Stunnable/Systems/StunbatonSystem.cs index 027259495c..5f019490b5 100644 --- a/Content.Server/Stunnable/Systems/StunbatonSystem.cs +++ b/Content.Server/Stunnable/Systems/StunbatonSystem.cs @@ -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(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 entity, ref ItemToggledEvent args) diff --git a/Resources/Locale/en-US/weapons/melee/melee.ftl b/Resources/Locale/en-US/weapons/melee/melee.ftl index 6dddfcc824..871d142504 100644 --- a/Resources/Locale/en-US/weapons/melee/melee.ftl +++ b/Resources/Locale/en-US/weapons/melee/melee.ftl @@ -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.