fixes medical ATK and ABK blinky lights (#22490)

title
This commit is contained in:
Wowzewow (Wezzy)
2026-05-23 20:09:46 +00:00
committed by GitHub
parent bce57bf21a
commit b7dfac9615
2 changed files with 60 additions and 4 deletions
+2 -4
View File
@@ -103,14 +103,12 @@ Contains:
return //If it does not, do nothing
var/ratio = CEILING(clamp(amount / max_amount, 0, 1) * charge_sections, 1)
ClearOverlays()
var/iconState = "[icon_state]_charge"
var/overlay_icon_state = "[icon_state]_charge"
if(!amount) //Checks if there are still charges left in the item
return //If it does not, do nothing, as the overlays have been cut before this already.
else
var/mutable_appearance/charge_overlay = mutable_appearance(icon, iconState)
for(var/i = ratio, i >= 1, i--)
charge_overlay.pixel_x = charge_x_offset * (i - 1)
AddOverlays(charge_overlay)
AddOverlays(image(icon, overlay_icon_state, pixel_x = charge_x_offset * (i - 1)))
// Bruise Pack.
/obj/item/stack/medical/bruise_pack