Cached version of icon_states() proc

This commit is contained in:
Aronai Sieyes
2020-05-06 16:05:59 -04:00
parent aaa86b1ed1
commit d172e2dd04
17 changed files with 45 additions and 26 deletions

View File

@@ -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"

View File

@@ -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)