Merge pull request #6888 from mwerezak/atmos-icon-cache

Fixes #6746
This commit is contained in:
Ccomp5950
2014-10-31 12:09:45 -04:00
2 changed files with 11 additions and 4 deletions

View File

@@ -67,8 +67,8 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_
return omni_icons[state]
if("underlay")
return underlays[state + dir + color]
//if("underlay_intact")
// return underlays_intact[state + dir + color]
// if("underlay_intact")
// return underlays_intact[state + dir + color]
// if("underlay_exposed")
// return underlays_exposed[state + dir + color]
// if("underlay_down")
@@ -194,6 +194,11 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_
I.color = pipe_colors[pipe_color]
underlays[state + "[D]" + "[pipe_colors[pipe_color]]"] = I
/*
Leaving the old icon manager code commented out for now, as we may want to rewrite the new code to cleanly
separate the newpipe icon caching (speshul supply and scrubber lines) from the rest of the pipe code.
*/
/*
/datum/pipe_icon_manager/proc/gen_underlay_icons()
if(!underlays_intact)

View File

@@ -190,9 +190,11 @@
if(!istype(T))
return
if(T.intact && istype(P.node, /obj/machinery/atmospherics/pipe) && P.node.level == 1 )
pipe_state = icon_manager.get_atmos_icon("underlay_down", P.dir, color_cache_name(P.node))
//pipe_state = icon_manager.get_atmos_icon("underlay_down", P.dir, color_cache_name(P.node))
pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "down")
else
pipe_state = icon_manager.get_atmos_icon("underlay_intact", P.dir, color_cache_name(P.node))
//pipe_state = icon_manager.get_atmos_icon("underlay_intact", P.dir, color_cache_name(P.node))
pipe_state = icon_manager.get_atmos_icon("underlay", P.dir, color_cache_name(P.node), "intact")
return list("on_icon" = ic_on, "off_icon" = ic_off, "pipe_icon" = pipe_state)