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
@@ -37,7 +37,7 @@
for(var/obj/structure/transit_tube_pod/pod in loc)
if(!pod.moving)
AM.forceMove(pod)
pod.update_icon()
pod.update_appearance()
return
@@ -259,7 +259,7 @@
playsound(src, 'sound/weapons/emitter2.ogg', 50, TRUE)
pod.setDir(turn(src.dir, -90))
AM.forceMove(pod)
pod.update_icon()
pod.update_appearance()
launch_pod()
/obj/structure/transit_tube/station/dispenser/pod_stopped(obj/structure/transit_tube_pod/pod, from_dir)
@@ -31,10 +31,8 @@
return ..()
/obj/structure/transit_tube_pod/update_icon_state()
if(contents.len)
icon_state = occupied_icon_state
else
icon_state = initial(icon_state)
icon_state = contents.len ? occupied_icon_state : initial(icon_state)
return ..()
/obj/structure/transit_tube_pod/attackby(obj/item/I, mob/user, params)
if(I.tool_behaviour == TOOL_CROWBAR)
@@ -98,7 +96,7 @@
location = get_turf(src)
for(var/atom/movable/M in contents)
M.forceMove(location)
update_icon()
update_appearance()
/obj/structure/transit_tube_pod/Process_Spacemove()
if(moving) //No drifting while moving in the tubes
@@ -199,7 +197,7 @@
if(direction == turn(station.boarding_dir,180))
if(station.open_status == STATION_TUBE_OPEN)
user.forceMove(loc)
update_icon()
update_appearance()
else
station.open_animation()
else if(direction in station.tube_dirs)