Pipe fixes

- Cleans up silent pipe deleting (now creates a loose pipe item where the pipe section was)
- Allows pipe painters to paint disconnected pipes
- Removes OOC message from IC feedback
This commit is contained in:
Loganbacca
2014-06-24 18:26:37 +12:00
parent 30bf9302d6
commit 493ecdeb9e
2 changed files with 23 additions and 13 deletions

View File

@@ -220,15 +220,16 @@ obj/machinery/atmospherics/pipe/simple/pipeline_expansion()
return list(node1, node2)
obj/machinery/atmospherics/pipe/simple/update_icon()
if(node1&&node2)
switch(pipe_color)
if ("red") color = COLOR_RED
if ("blue") color = COLOR_BLUE
if ("cyan") color = COLOR_CYAN
if ("green") color = COLOR_GREEN
if ("yellow") color = "#FFCC00"
if ("purple") color = "#5C1EC0"
if ("grey") color = null
switch(pipe_color)
if ("red") color = COLOR_RED
if ("blue") color = COLOR_BLUE
if ("cyan") color = COLOR_CYAN
if ("green") color = COLOR_GREEN
if ("yellow") color = "#FFCC00"
if ("purple") color = "#5C1EC0"
if ("grey") color = null
if(node1 && node2)
icon_state = "intact[invisibility ? "-f" : "" ]"
//var/node1_direction = get_dir(src, node1)
@@ -237,8 +238,14 @@ obj/machinery/atmospherics/pipe/simple/update_icon()
//dir = node1_direction|node2_direction
else
if(!node1&&!node2)
del(src) //TODO: silent deleting looks weird
if(!node1 && !node2)
var/turf/T = get_turf(src)
new /obj/item/pipe(loc, make_from=src)
for (var/obj/machinery/meter/meter in T)
if (meter.target == src)
new /obj/item/pipe_meter(T)
del(meter)
del(src)
var/have_node1 = node1?1:0
var/have_node2 = node2?1:0
icon_state = "exposed[have_node1][have_node2][invisibility ? "-f" : "" ]"
@@ -265,6 +272,9 @@ obj/machinery/atmospherics/pipe/simple/initialize()
node2 = target
break
if(!node1 && !node2)
del(src)
return
var/turf/T = src.loc // hide if turf is not intact
hide(T.intact)
@@ -1107,4 +1117,4 @@ obj/machinery/atmospherics/pipe/vent/hide(var/i) //to make the little pipe secti
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]intact"
dir = get_dir(src, node1)
else
icon_state = "exposed"
icon_state = "exposed"