mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
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:
@@ -220,15 +220,16 @@ obj/machinery/atmospherics/pipe/simple/pipeline_expansion()
|
|||||||
return list(node1, node2)
|
return list(node1, node2)
|
||||||
|
|
||||||
obj/machinery/atmospherics/pipe/simple/update_icon()
|
obj/machinery/atmospherics/pipe/simple/update_icon()
|
||||||
if(node1&&node2)
|
switch(pipe_color)
|
||||||
switch(pipe_color)
|
if ("red") color = COLOR_RED
|
||||||
if ("red") color = COLOR_RED
|
if ("blue") color = COLOR_BLUE
|
||||||
if ("blue") color = COLOR_BLUE
|
if ("cyan") color = COLOR_CYAN
|
||||||
if ("cyan") color = COLOR_CYAN
|
if ("green") color = COLOR_GREEN
|
||||||
if ("green") color = COLOR_GREEN
|
if ("yellow") color = "#FFCC00"
|
||||||
if ("yellow") color = "#FFCC00"
|
if ("purple") color = "#5C1EC0"
|
||||||
if ("purple") color = "#5C1EC0"
|
if ("grey") color = null
|
||||||
if ("grey") color = null
|
|
||||||
|
if(node1 && node2)
|
||||||
icon_state = "intact[invisibility ? "-f" : "" ]"
|
icon_state = "intact[invisibility ? "-f" : "" ]"
|
||||||
|
|
||||||
//var/node1_direction = get_dir(src, node1)
|
//var/node1_direction = get_dir(src, node1)
|
||||||
@@ -237,8 +238,14 @@ obj/machinery/atmospherics/pipe/simple/update_icon()
|
|||||||
//dir = node1_direction|node2_direction
|
//dir = node1_direction|node2_direction
|
||||||
|
|
||||||
else
|
else
|
||||||
if(!node1&&!node2)
|
if(!node1 && !node2)
|
||||||
del(src) //TODO: silent deleting looks weird
|
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_node1 = node1?1:0
|
||||||
var/have_node2 = node2?1:0
|
var/have_node2 = node2?1:0
|
||||||
icon_state = "exposed[have_node1][have_node2][invisibility ? "-f" : "" ]"
|
icon_state = "exposed[have_node1][have_node2][invisibility ? "-f" : "" ]"
|
||||||
@@ -265,6 +272,9 @@ obj/machinery/atmospherics/pipe/simple/initialize()
|
|||||||
node2 = target
|
node2 = target
|
||||||
break
|
break
|
||||||
|
|
||||||
|
if(!node1 && !node2)
|
||||||
|
del(src)
|
||||||
|
return
|
||||||
|
|
||||||
var/turf/T = src.loc // hide if turf is not intact
|
var/turf/T = src.loc // hide if turf is not intact
|
||||||
hide(T.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"
|
icon_state = "[i == 1 && istype(loc, /turf/simulated) ? "h" : "" ]intact"
|
||||||
dir = get_dir(src, node1)
|
dir = get_dir(src, node1)
|
||||||
else
|
else
|
||||||
icon_state = "exposed"
|
icon_state = "exposed"
|
||||||
|
|||||||
@@ -428,7 +428,7 @@ Buildable meters
|
|||||||
//P.level = T.intact ? 2 : 1
|
//P.level = T.intact ? 2 : 1
|
||||||
P.initialize()
|
P.initialize()
|
||||||
if (!P)
|
if (!P)
|
||||||
usr << "There's nothing to connect this junction to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)"
|
usr << "There's nothing to connect this pipe to!" //(with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)"
|
||||||
return 1
|
return 1
|
||||||
P.build_network()
|
P.build_network()
|
||||||
if (P.node1)
|
if (P.node1)
|
||||||
|
|||||||
Reference in New Issue
Block a user