Merge pull request #6947 from mwerezak/pipe-cap

Fixes #6299, Again
This commit is contained in:
Chinsky
2014-11-07 03:45:56 +03:00
3 changed files with 20 additions and 18 deletions
+19 -17
View File
@@ -911,29 +911,21 @@
/obj/machinery/atmospherics/pipe/cap
name = "pipe endcap"
desc = "An endcap for pipes"
icon = 'icons/obj/pipes.dmi'
icon_state = "cap"
icon = 'icons/atmos/pipes.dmi'
icon_state = ""
level = 2
layer = 2.4 //under wires with their 2.44
volume = 35
dir = SOUTH
initialize_directions = NORTH
initialize_directions = SOUTH
var/obj/machinery/atmospherics/node
/obj/machinery/atmospherics/pipe/cap/New()
..()
switch(dir)
if(SOUTH)
initialize_directions = NORTH
if(NORTH)
initialize_directions = SOUTH
if(WEST)
initialize_directions = EAST
if(EAST)
initialize_directions = WEST
initialize_directions = dir
/obj/machinery/atmospherics/pipe/cap/hide(var/i)
if(level == 1 && istype(loc, /turf/simulated))
@@ -964,11 +956,20 @@
..()
/obj/machinery/atmospherics/pipe/cap/update_icon()
overlays = new()
/obj/machinery/atmospherics/pipe/cap/change_color(var/new_color)
..()
//for updating connected atmos device pipes (i.e. vents, manifolds, etc)
if(node)
node.update_underlays()
icon_state = "cap[invisibility ? "-f" : ""]"
return
/obj/machinery/atmospherics/pipe/cap/update_icon(var/safety = 0)
if(!check_icon_cache())
return
alpha = 255
overlays.Cut()
overlays += icon_manager.get_atmos_icon("pipe", , pipe_color, "cap")
/obj/machinery/atmospherics/pipe/cap/initialize()
for(var/obj/machinery/atmospherics/target in get_step(src, dir))
@@ -1008,7 +1009,8 @@
/obj/machinery/atmospherics/pipe/cap/hidden
level = 1
icon_state = "cap-f"
icon_state = "cap"
alpha = 128
/obj/machinery/atmospherics/pipe/cap/hidden/scrubbers
name = "scrubbers pipe endcap"