mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +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:
@@ -76,7 +76,7 @@
|
||||
var/list/temp = SSmaterials.rigid_stack_recipes.Copy()
|
||||
recipes += temp
|
||||
update_weight()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
|
||||
/** Sets the amount of materials per unit for this stack.
|
||||
*
|
||||
@@ -125,13 +125,15 @@
|
||||
|
||||
/obj/item/stack/update_icon_state()
|
||||
if(novariants)
|
||||
return
|
||||
return ..()
|
||||
if(amount <= (max_amount * (1/3)))
|
||||
icon_state = initial(icon_state)
|
||||
else if (amount <= (max_amount * (2/3)))
|
||||
return ..()
|
||||
if (amount <= (max_amount * (2/3)))
|
||||
icon_state = "[initial(icon_state)]_2"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]_3"
|
||||
return ..()
|
||||
icon_state = "[initial(icon_state)]_3"
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -364,7 +366,7 @@
|
||||
return TRUE
|
||||
if(length(mats_per_unit))
|
||||
update_custom_materials()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
update_weight()
|
||||
return TRUE
|
||||
|
||||
@@ -402,7 +404,7 @@
|
||||
amount += _amount
|
||||
if(length(mats_per_unit))
|
||||
update_custom_materials()
|
||||
update_icon()
|
||||
update_appearance()
|
||||
update_weight()
|
||||
|
||||
/** Checks whether this stack can merge itself into another stack.
|
||||
|
||||
Reference in New Issue
Block a user