mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Cached version of icon_states() proc
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
overlays.Cut()
|
||||
if(front_id)
|
||||
var/tiny_state = "id-generic"
|
||||
if("id-"+front_id.icon_state in icon_states(icon))
|
||||
if("id-"+front_id.icon_state in cached_icon_states(icon))
|
||||
tiny_state = "id-"+front_id.icon_state
|
||||
var/image/tiny_image = new/image(icon, icon_state = tiny_state)
|
||||
tiny_image.appearance_flags = RESET_COLOR
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/cult = 0
|
||||
|
||||
/obj/structure/sign/double/barsign/proc/get_valid_states(initial=1)
|
||||
. = icon_states(icon)
|
||||
. = cached_icon_states(icon)
|
||||
. -= "on"
|
||||
. -= "narsiebistro"
|
||||
. -= "empty"
|
||||
|
||||
@@ -114,7 +114,7 @@ two tiles on initialization, and which way a cliff is facing may change during m
|
||||
|
||||
var/subtraction_icon_state = "[icon_state]-subtract"
|
||||
var/cache_string = "[icon_state]_[T.icon]_[T.icon_state]"
|
||||
if(T && subtraction_icon_state in icon_states(icon))
|
||||
if(T && subtraction_icon_state in cached_icon_states(icon))
|
||||
cut_overlays()
|
||||
// If we've made the same icon before, just recycle it.
|
||||
if(cache_string in GLOB.cliff_icon_cache)
|
||||
|
||||
Reference in New Issue
Block a user