mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +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:
@@ -20,7 +20,7 @@
|
||||
|
||||
/obj/machinery/skill_station/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
//Only usable by the person inside
|
||||
/obj/machinery/skill_station/ui_state(mob/user)
|
||||
@@ -38,6 +38,7 @@
|
||||
icon_state += "_open"
|
||||
if(occupant)
|
||||
icon_state += "_occupied"
|
||||
return ..()
|
||||
|
||||
/obj/machinery/skill_station/update_overlays()
|
||||
. = ..()
|
||||
@@ -72,7 +73,7 @@
|
||||
if(work_timer)
|
||||
deltimer(work_timer)
|
||||
work_timer = null
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/obj/machinery/skill_station/interact(mob/user)
|
||||
. = ..()
|
||||
@@ -115,7 +116,7 @@
|
||||
|
||||
working = TRUE
|
||||
work_timer = addtimer(CALLBACK(src,.proc/implant),SKILLCHIP_IMPLANT_TIME,TIMER_STOPPABLE)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/// Finish implanting.
|
||||
/obj/machinery/skill_station/proc/implant()
|
||||
@@ -129,7 +130,7 @@
|
||||
to_chat(carbon_occupant,"<span class='notice'>Operation complete!</span>")
|
||||
inserted_skillchip = null
|
||||
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/// Start removal.
|
||||
/obj/machinery/skill_station/proc/start_removal(obj/item/skillchip/to_be_removed)
|
||||
@@ -142,13 +143,13 @@
|
||||
|
||||
working = TRUE
|
||||
work_timer = addtimer(CALLBACK(src,.proc/remove_skillchip,to_be_removed),SKILLCHIP_REMOVAL_TIME,TIMER_STOPPABLE)
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/// Finish removal.
|
||||
/obj/machinery/skill_station/proc/remove_skillchip(obj/item/skillchip/to_be_removed)
|
||||
working = FALSE
|
||||
work_timer = null
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
var/mob/living/carbon/carbon_occupant = occupant
|
||||
|
||||
|
||||
Reference in New Issue
Block a user