Fixes energy shield bugs and adds colour change as they take damage (#22748)

Energy shields weren't updating their sprite when they overloaded.
Only one held shield was ever checked for block chance.

Adds a colour change from red to blue as the shield power gets lower.
Also adds it's current strength to the examine text.


https://github.com/user-attachments/assets/9f378084-f529-4138-bcaf-5e5e66f5377a
This commit is contained in:
FenodyreeAv
2026-07-08 12:17:56 +00:00
committed by GitHub
parent 081dc8acf9
commit 2aa26dd3c3
6 changed files with 65 additions and 19 deletions
@@ -152,6 +152,7 @@ emp_act
return null
/mob/living/carbon/human/check_shields(damage, atom/damage_source, mob/attacker, def_zone, attack_text = "the attack")
var/result
for(var/obj/item/shield in list(l_hand, r_hand, wear_suit, back))
if(!shield)
continue
@@ -160,9 +161,10 @@ emp_act
if(!shield.can_shield_back())
continue
is_on_back = TRUE
return shield.handle_shield(src, is_on_back, damage, damage_source, attacker, def_zone, attack_text)
return BULLET_ACT_HIT
result = shield.handle_shield(src, is_on_back, damage, damage_source, attacker, def_zone, attack_text)
if (result == BULLET_ACT_FORCE_PIERCE || result == BULLET_ACT_BLOCK) //Necessary to handle multiple shields.
return result
return result
/mob/living/carbon/human/emp_act(severity)
/*