mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 14:37:27 +01:00
Cached version of icon_states() proc
This commit is contained in:
@@ -204,12 +204,12 @@ You can set verify to TRUE if you want send() to sleep until the client has the
|
||||
directions = list(SOUTH)
|
||||
|
||||
var/sprites = list()
|
||||
for (var/icon_state_name in icon_states(I))
|
||||
for (var/icon_state_name in cached_icon_states(I))
|
||||
for (var/direction in directions)
|
||||
var/suffix = (directions.len > 1) ? "-[dir2text(direction)]" : ""
|
||||
var/sprite_name = "[prefix][icon_state_name][suffix]"
|
||||
var/icon/sprite = icon(I, icon_state=icon_state_name, dir=direction, frame=1, moving=FALSE)
|
||||
if (!sprite || !length(icon_states(sprite))) // that direction or state doesn't exist
|
||||
if (!sprite || !length(cached_icon_states(sprite))) // that direction or state doesn't exist
|
||||
continue
|
||||
sprites[sprite_name] = sprite
|
||||
return sprites
|
||||
|
||||
Reference in New Issue
Block a user