mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 17:45:02 +01:00
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:
@@ -84,7 +84,7 @@
|
||||
|
||||
if(A.health >= 0 && A.stat == DEAD)
|
||||
A.revive(full_heal = FALSE, admin_revive = FALSE)
|
||||
cardhold.update_icon()
|
||||
cardhold.update_appearance()
|
||||
|
||||
// Finished restoring
|
||||
if(A.health >= 100)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
computer.visible_message("<span class='notice'>\The [computer]'s screen brightly flashes and loud electrical buzzing is heard.</span>")
|
||||
computer.enabled = FALSE
|
||||
computer.update_icon()
|
||||
computer.update_appearance()
|
||||
var/obj/item/computer_hardware/hard_drive/hard_drive = computer.all_components[MC_HDD]
|
||||
var/obj/item/computer_hardware/battery/battery_module = computer.all_components[MC_CELL]
|
||||
var/obj/item/computer_hardware/recharger/recharger = computer.all_components[MC_CHARGE]
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
game_active = FALSE
|
||||
program_icon_state = "arcade_off"
|
||||
if(istype(computer))
|
||||
computer.update_icon()
|
||||
computer.update_appearance()
|
||||
ticket_count += 1
|
||||
user?.mind?.adjust_experience(/datum/skill/gaming, 50)
|
||||
sleep(10)
|
||||
@@ -42,7 +42,7 @@
|
||||
game_active = FALSE
|
||||
program_icon_state = "arcade_off"
|
||||
if(istype(computer))
|
||||
computer.update_icon()
|
||||
computer.update_appearance()
|
||||
user?.mind?.adjust_experience(/datum/skill/gaming, 10)
|
||||
sleep(10)
|
||||
|
||||
@@ -175,4 +175,4 @@
|
||||
boss_id = rand(1,6)
|
||||
pause_state = FALSE
|
||||
if(istype(computer))
|
||||
computer.update_icon()
|
||||
computer.update_appearance()
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
ui_header = "smmon_[last_status].gif"
|
||||
program_icon_state = "smmon_[last_status]"
|
||||
if(istype(computer))
|
||||
computer.update_icon()
|
||||
computer.update_appearance()
|
||||
|
||||
/datum/computer_file/program/supermatter_monitor/run_program(mob/living/user)
|
||||
. = ..(user)
|
||||
|
||||
Reference in New Issue
Block a user