mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 13:07:46 +01:00
External organ icon handling tweak (#18826)
* Hm, let's try this * Nevermind, a new proc is better than doing a bunch of early returned jumps
This commit is contained in:
@@ -7,6 +7,9 @@
|
||||
max_damage = 0
|
||||
dir = SOUTH
|
||||
organ_tag = "limb"
|
||||
|
||||
blocks_emissive = FALSE
|
||||
|
||||
var/brute_mod = 1
|
||||
var/burn_mod = 1
|
||||
|
||||
@@ -249,7 +252,7 @@
|
||||
|
||||
if(owner_old)
|
||||
owner_old.updatehealth("limb receive damage")
|
||||
return update_icon()
|
||||
return update_state()
|
||||
|
||||
#undef LIMB_SHARP_THRESH_INT_DMG
|
||||
#undef LIMB_THRESH_INT_DMG
|
||||
@@ -269,7 +272,7 @@
|
||||
if(updating_health)
|
||||
owner.updatehealth("limb heal damage")
|
||||
|
||||
return update_icon()
|
||||
return update_state()
|
||||
|
||||
/obj/item/organ/external/emp_act(severity)
|
||||
if(!is_robotic() || emp_proof)
|
||||
@@ -322,7 +325,7 @@ This function completely restores a damaged organ to perfect condition.
|
||||
|
||||
if(owner)
|
||||
owner.updatehealth("limb rejuvenate")
|
||||
update_icon()
|
||||
update_state()
|
||||
if(!owner)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
@@ -185,8 +185,8 @@ GLOBAL_LIST_EMPTY(limb_icon_cache)
|
||||
|
||||
// new damage icon system
|
||||
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)
|
||||
/obj/item/organ/external/update_icon(updates=ALL)
|
||||
..()
|
||||
|
||||
/obj/item/organ/external/proc/update_state()
|
||||
var/n_is = damage_state_text()
|
||||
if(n_is != damage_state)
|
||||
damage_state = n_is
|
||||
|
||||
Reference in New Issue
Block a user