Fixes pipes duplication issues

This commit is contained in:
igalan
2014-09-03 23:48:30 +01:00
parent ed9850b373
commit 6bf6eaeb60
3 changed files with 33 additions and 17 deletions

View File

@@ -35,6 +35,10 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
if(target.initialize_directions_he & get_dir(target,src)) if(target.initialize_directions_he & get_dir(target,src))
node2 = target node2 = target
break break
if(!node1 && !node2)
del(src)
return
update_icon() update_icon()
return return
@@ -102,5 +106,9 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
node2 = target node2 = target
break break
if(!node1&&!node2)
del(src)
return
update_icon() update_icon()
return return

View File

@@ -523,6 +523,10 @@
if (node3) if (node3)
break break
if(!node1 && !node2 && !node3)
del(src)
return
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if(istype(T)) if(istype(T))
hide(T.intact) hide(T.intact)
@@ -720,6 +724,10 @@
node4 = target node4 = target
break break
if(!node1 && !node2 && !node3 && !node4)
del(src)
return
var/turf/T = get_turf(src) var/turf/T = get_turf(src)
if(istype(T)) if(istype(T))
hide(T.intact) hide(T.intact)

View File

@@ -390,7 +390,7 @@ Buildable meters
M.level = T.intact ? 2 : 1 M.level = T.intact ? 2 : 1
M.initialize() M.initialize()
if (!M) if (!M)
usr << "There's nothing to connect this manifold to!" //(with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" usr << pipefailtext
return 1 return 1
M.build_network() M.build_network()
if (M.node1) if (M.node1)
@@ -413,7 +413,7 @@ Buildable meters
M.level = T.intact ? 2 : 1 M.level = T.intact ? 2 : 1
M.initialize() M.initialize()
if (!M) if (!M)
usr << "There's nothing to connect this manifold to!" //(with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" usr << pipefailtext
return 1 return 1
M.build_network() M.build_network()
if (M.node1) if (M.node1)