mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-01-30 02:44:26 +00: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
|
||||
|
||||
@@ -841,7 +841,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
dat += "<td width = 400>[current_species.blurb]</td>"
|
||||
//vorestation edit end
|
||||
dat += "<td width = 200 align='center'>"
|
||||
if("preview" in icon_states(current_species.icobase))
|
||||
if("preview" in cached_icon_states(current_species.icobase))
|
||||
usr << browse_rsc(icon(current_species.icobase,"preview"), "species_preview_[current_species.name].png")
|
||||
dat += "<img src='species_preview_[current_species.name].png' width='64px' height='64px'><br/><br/>"
|
||||
dat += "<b>Language:</b> [current_species.species_language]<br/>"
|
||||
|
||||
Reference in New Issue
Block a user