update_appearance (#55468)

Creates update_name and update_desc
Creates the wrapper proc update_appearance to batch update_name, update_desc, and update_icon together
Less non-icon handling code in update_icon and friends
Signal hooks for things that want to change names and descriptions
99%+ of the changes in this are just from switching everything over to update_appearance from update_icon
This commit is contained in:
TemporalOroboros
2021-02-19 12:06:18 -03:00
committed by GitHub
parent dc4b7226d0
commit e4079c87b8
585 changed files with 4689 additions and 4133 deletions
+3 -2
View File
@@ -135,7 +135,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
if(target.client)
target.client.images |= current_image
/obj/effect/hallucination/simple/update_icon(new_state,new_icon,new_px=0,new_py=0)
/obj/effect/hallucination/simple/update_icon(updates=ALL, new_state, new_icon, new_px=0, new_py=0)
image_state = new_state
if(new_icon)
image_icon = new_icon
@@ -143,6 +143,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
image_icon = initial(image_icon)
px = new_px
py = new_py
. = ..()
Show()
/obj/effect/hallucination/simple/Moved(atom/OldLoc, Dir)
@@ -248,7 +249,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
name = "alien hunter ([rand(1, 1000)])"
/obj/effect/hallucination/simple/xeno/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
update_icon("alienh_pounce")
update_icon(ALL, "alienh_pounce")
if(hit_atom == target && target.stat!=DEAD)
target.Paralyze(100)
target.visible_message("<span class='danger'>[target] flails around wildly.</span>","<span class='userdanger'>[name] pounces on you!</span>")