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
@@ -16,7 +16,7 @@
var/atom/selected
///Used to store when the next scan is available. Updated by the scan() proc.
var/next_scan = 0
///Used to keep track of the last value program_icon_state was set to, to prevent constant unnecessary update_icon() calls
///Used to keep track of the last value program_icon_state was set to, to prevent constant unnecessary update_appearance() calls
var/last_icon_state = ""
///Used by the tgui interface, themed NT or Syndicate.
var/arrowstyle = "ntosradarpointer.png"
@@ -175,7 +175,7 @@
if(!trackable(signal))
program_icon_state = "[initial(program_icon_state)]lost"
if(last_icon_state != program_icon_state)
computer.update_icon()
computer.update_appearance()
last_icon_state = program_icon_state
return
@@ -193,7 +193,7 @@
program_icon_state = "[initial(program_icon_state)]far"
if(last_icon_state != program_icon_state)
computer.update_icon()
computer.update_appearance()
last_icon_state = program_icon_state
computer.setDir(get_dir(here_turf, target_turf))