Fix recharging spray painter (#40953)
* commit * fix --------- Co-authored-by: iaada <iaada@users.noreply.github.com>
This commit is contained in:
parent
228986e2b8
commit
d5411ae965
|
|
@ -56,7 +56,7 @@ public sealed class SprayPainterSystem : SharedSprayPainterSystem
|
|||
return;
|
||||
|
||||
args.Handled = true;
|
||||
if (TryComp(ent, out LimitedChargesComponent? charges) && charges.LastCharges < ent.Comp.DecalChargeCost)
|
||||
if (TryComp(ent, out LimitedChargesComponent? charges) && _charges.GetCurrentCharges((ent, charges)) < ent.Comp.DecalChargeCost)
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("spray-painter-interact-no-charges"), args.User, args.User);
|
||||
return;
|
||||
|
|
@ -165,7 +165,7 @@ public sealed class SprayPainterSystem : SharedSprayPainterSystem
|
|||
return;
|
||||
|
||||
if (TryComp<LimitedChargesComponent>(args.Used, out var charges)
|
||||
&& charges.LastCharges < painter.PipeChargeCost)
|
||||
&& _charges.GetCurrentCharges((args.Used, charges)) < painter.PipeChargeCost)
|
||||
{
|
||||
var msg = Loc.GetString("spray-painter-interact-no-charges");
|
||||
_popup.PopupEntity(msg, args.User, args.User);
|
||||
|
|
|
|||
Loading…
Reference in New Issue