mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
Fixes pipes duplication issues
This commit is contained in:
@@ -35,6 +35,10 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
|
||||
if(target.initialize_directions_he & get_dir(target,src))
|
||||
node2 = target
|
||||
break
|
||||
if(!node1 && !node2)
|
||||
del(src)
|
||||
return
|
||||
|
||||
update_icon()
|
||||
return
|
||||
|
||||
@@ -102,5 +106,9 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
|
||||
node2 = target
|
||||
break
|
||||
|
||||
if(!node1&&!node2)
|
||||
del(src)
|
||||
return
|
||||
|
||||
update_icon()
|
||||
return
|
||||
|
||||
@@ -523,6 +523,10 @@
|
||||
if (node3)
|
||||
break
|
||||
|
||||
if(!node1 && !node2 && !node3)
|
||||
del(src)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(istype(T))
|
||||
hide(T.intact)
|
||||
@@ -720,6 +724,10 @@
|
||||
node4 = target
|
||||
break
|
||||
|
||||
if(!node1 && !node2 && !node3 && !node4)
|
||||
del(src)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(istype(T))
|
||||
hide(T.intact)
|
||||
|
||||
@@ -390,7 +390,7 @@ Buildable meters
|
||||
M.level = T.intact ? 2 : 1
|
||||
M.initialize()
|
||||
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
|
||||
M.build_network()
|
||||
if (M.node1)
|
||||
@@ -413,7 +413,7 @@ Buildable meters
|
||||
M.level = T.intact ? 2 : 1
|
||||
M.initialize()
|
||||
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
|
||||
M.build_network()
|
||||
if (M.node1)
|
||||
|
||||
Reference in New Issue
Block a user