mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +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:
@@ -57,10 +57,8 @@ FLOOR SAFES
|
||||
I.forceMove(src)
|
||||
|
||||
/obj/structure/safe/update_icon_state()
|
||||
if(open)
|
||||
icon_state = "[initial(icon_state)]-open"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
icon_state = "[initial(icon_state)][open ? "-open" : null]"
|
||||
return ..()
|
||||
|
||||
/obj/structure/safe/attackby(obj/item/I, mob/user, params)
|
||||
if(open)
|
||||
@@ -147,7 +145,7 @@ FLOOR SAFES
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You [open ? "close" : "open"] [src].</span>")
|
||||
open = !open
|
||||
update_icon()
|
||||
update_appearance()
|
||||
return TRUE
|
||||
if("turnright")
|
||||
if(open)
|
||||
|
||||
Reference in New Issue
Block a user