mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +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:
@@ -40,7 +40,7 @@
|
||||
if(!..())
|
||||
return FALSE//Cooldown check
|
||||
timing = !timing
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return TRUE
|
||||
|
||||
/obj/item/assembly/timer/toggle_secure()
|
||||
@@ -50,7 +50,7 @@
|
||||
else
|
||||
timing = FALSE
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return secured
|
||||
|
||||
/obj/item/assembly/timer/proc/timer_end()
|
||||
@@ -64,7 +64,7 @@
|
||||
LM.playsound_local(get_turf(src), 'sound/machines/triple_beep.ogg', ASSEMBLY_BEEP_VOLUME, TRUE)
|
||||
if(loop)
|
||||
timing = TRUE
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/item/assembly/timer/process(delta_time)
|
||||
if(!timing)
|
||||
@@ -75,14 +75,16 @@
|
||||
timer_end()
|
||||
time = saved_time
|
||||
|
||||
/obj/item/assembly/timer/update_icon()
|
||||
cut_overlays()
|
||||
/obj/item/assembly/timer/update_appearance()
|
||||
. = ..()
|
||||
holder?.update_appearance()
|
||||
|
||||
/obj/item/assembly/timer/update_overlays()
|
||||
. = ..()
|
||||
attached_overlays = list()
|
||||
if(timing)
|
||||
add_overlay("timer_timing")
|
||||
. += "timer_timing"
|
||||
attached_overlays += "timer_timing"
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
|
||||
/obj/item/assembly/timer/ui_status(mob/user)
|
||||
if(is_secured(user))
|
||||
@@ -113,7 +115,7 @@
|
||||
timing = !timing
|
||||
if(timing && istype(holder, /obj/item/transfer_valve))
|
||||
log_bomber(usr, "activated a", src, "attachment on [holder]")
|
||||
update_icon()
|
||||
update_appearance()
|
||||
. = TRUE
|
||||
if("repeat")
|
||||
loop = !loop
|
||||
|
||||
Reference in New Issue
Block a user