mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +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
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple
|
||||
icon = 'icons/atmos/pipes.dmi'
|
||||
icon_state = ""
|
||||
icon_state = ""
|
||||
name = "pipe"
|
||||
desc = "A one meter section of regular pipe"
|
||||
|
||||
@@ -305,8 +305,8 @@
|
||||
|
||||
return null
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible
|
||||
icon_state = "intact"
|
||||
/obj/machinery/atmospherics/pipe/simple/visible
|
||||
icon_state = "intact"
|
||||
level = 2
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/scrubbers
|
||||
@@ -329,8 +329,8 @@
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/purple
|
||||
color = PIPE_COLOR_PURPLE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden
|
||||
icon_state = "intact"
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden
|
||||
icon_state = "intact"
|
||||
level = 1
|
||||
alpha = 128 //set for the benefit of mapping - this is reset to opaque when the pipe is spawned in game
|
||||
|
||||
@@ -368,8 +368,8 @@
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold
|
||||
icon = 'icons/atmos/manifold.dmi'
|
||||
icon_state = ""
|
||||
icon = 'icons/atmos/manifold.dmi'
|
||||
icon_state = ""
|
||||
name = "pipe manifold"
|
||||
desc = "A manifold composed of regular pipes"
|
||||
|
||||
@@ -523,13 +523,17 @@
|
||||
if (node3)
|
||||
break
|
||||
|
||||
if(!node1 && !node2 && !node3)
|
||||
del(src)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(istype(T))
|
||||
hide(T.intact)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/visible
|
||||
icon_state = "map"
|
||||
icon_state = "map"
|
||||
level = 2
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/visible/scrubbers
|
||||
@@ -553,7 +557,7 @@
|
||||
color = PIPE_COLOR_PURPLE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/hidden
|
||||
icon_state = "map"
|
||||
icon_state = "map"
|
||||
level = 1
|
||||
alpha = 128 //set for the benefit of mapping - this is reset to opaque when the pipe is spawned in game
|
||||
|
||||
@@ -578,8 +582,8 @@
|
||||
color = PIPE_COLOR_PURPLE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w
|
||||
icon = 'icons/atmos/manifold.dmi'
|
||||
icon_state = ""
|
||||
icon = 'icons/atmos/manifold.dmi'
|
||||
icon_state = ""
|
||||
name = "4-way pipe manifold"
|
||||
desc = "A manifold composed of regular pipes"
|
||||
|
||||
@@ -720,13 +724,17 @@
|
||||
node4 = target
|
||||
break
|
||||
|
||||
if(!node1 && !node2 && !node3 && !node4)
|
||||
del(src)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
if(istype(T))
|
||||
hide(T.intact)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible
|
||||
icon_state = "map_4way"
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible
|
||||
icon_state = "map_4way"
|
||||
level = 2
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible/scrubbers
|
||||
@@ -749,8 +757,8 @@
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/visible/purple
|
||||
color = PIPE_COLOR_PURPLE
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hidden
|
||||
icon_state = "map_4way"
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/hidden
|
||||
icon_state = "map_4way"
|
||||
level = 1
|
||||
alpha = 128 //set for the benefit of mapping - this is reset to opaque when the pipe is spawned in game
|
||||
|
||||
|
||||
@@ -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