mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 20:23:26 +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))
|
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
|
||||||
|
|||||||
@@ -134,7 +134,7 @@
|
|||||||
|
|
||||||
/obj/machinery/atmospherics/pipe/simple
|
/obj/machinery/atmospherics/pipe/simple
|
||||||
icon = 'icons/atmos/pipes.dmi'
|
icon = 'icons/atmos/pipes.dmi'
|
||||||
icon_state = ""
|
icon_state = ""
|
||||||
name = "pipe"
|
name = "pipe"
|
||||||
desc = "A one meter section of regular pipe"
|
desc = "A one meter section of regular pipe"
|
||||||
|
|
||||||
@@ -305,8 +305,8 @@
|
|||||||
|
|
||||||
return null
|
return null
|
||||||
|
|
||||||
/obj/machinery/atmospherics/pipe/simple/visible
|
/obj/machinery/atmospherics/pipe/simple/visible
|
||||||
icon_state = "intact"
|
icon_state = "intact"
|
||||||
level = 2
|
level = 2
|
||||||
|
|
||||||
/obj/machinery/atmospherics/pipe/simple/visible/scrubbers
|
/obj/machinery/atmospherics/pipe/simple/visible/scrubbers
|
||||||
@@ -329,8 +329,8 @@
|
|||||||
/obj/machinery/atmospherics/pipe/simple/visible/purple
|
/obj/machinery/atmospherics/pipe/simple/visible/purple
|
||||||
color = PIPE_COLOR_PURPLE
|
color = PIPE_COLOR_PURPLE
|
||||||
|
|
||||||
/obj/machinery/atmospherics/pipe/simple/hidden
|
/obj/machinery/atmospherics/pipe/simple/hidden
|
||||||
icon_state = "intact"
|
icon_state = "intact"
|
||||||
level = 1
|
level = 1
|
||||||
alpha = 128 //set for the benefit of mapping - this is reset to opaque when the pipe is spawned in game
|
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
|
/obj/machinery/atmospherics/pipe/manifold
|
||||||
icon = 'icons/atmos/manifold.dmi'
|
icon = 'icons/atmos/manifold.dmi'
|
||||||
icon_state = ""
|
icon_state = ""
|
||||||
name = "pipe manifold"
|
name = "pipe manifold"
|
||||||
desc = "A manifold composed of regular pipes"
|
desc = "A manifold composed of regular pipes"
|
||||||
|
|
||||||
@@ -523,13 +523,17 @@
|
|||||||
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)
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
/obj/machinery/atmospherics/pipe/manifold/visible
|
/obj/machinery/atmospherics/pipe/manifold/visible
|
||||||
icon_state = "map"
|
icon_state = "map"
|
||||||
level = 2
|
level = 2
|
||||||
|
|
||||||
/obj/machinery/atmospherics/pipe/manifold/visible/scrubbers
|
/obj/machinery/atmospherics/pipe/manifold/visible/scrubbers
|
||||||
@@ -553,7 +557,7 @@
|
|||||||
color = PIPE_COLOR_PURPLE
|
color = PIPE_COLOR_PURPLE
|
||||||
|
|
||||||
/obj/machinery/atmospherics/pipe/manifold/hidden
|
/obj/machinery/atmospherics/pipe/manifold/hidden
|
||||||
icon_state = "map"
|
icon_state = "map"
|
||||||
level = 1
|
level = 1
|
||||||
alpha = 128 //set for the benefit of mapping - this is reset to opaque when the pipe is spawned in game
|
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
|
color = PIPE_COLOR_PURPLE
|
||||||
|
|
||||||
/obj/machinery/atmospherics/pipe/manifold4w
|
/obj/machinery/atmospherics/pipe/manifold4w
|
||||||
icon = 'icons/atmos/manifold.dmi'
|
icon = 'icons/atmos/manifold.dmi'
|
||||||
icon_state = ""
|
icon_state = ""
|
||||||
name = "4-way pipe manifold"
|
name = "4-way pipe manifold"
|
||||||
desc = "A manifold composed of regular pipes"
|
desc = "A manifold composed of regular pipes"
|
||||||
|
|
||||||
@@ -720,13 +724,17 @@
|
|||||||
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)
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
/obj/machinery/atmospherics/pipe/manifold4w/visible
|
/obj/machinery/atmospherics/pipe/manifold4w/visible
|
||||||
icon_state = "map_4way"
|
icon_state = "map_4way"
|
||||||
level = 2
|
level = 2
|
||||||
|
|
||||||
/obj/machinery/atmospherics/pipe/manifold4w/visible/scrubbers
|
/obj/machinery/atmospherics/pipe/manifold4w/visible/scrubbers
|
||||||
@@ -749,8 +757,8 @@
|
|||||||
/obj/machinery/atmospherics/pipe/manifold4w/visible/purple
|
/obj/machinery/atmospherics/pipe/manifold4w/visible/purple
|
||||||
color = PIPE_COLOR_PURPLE
|
color = PIPE_COLOR_PURPLE
|
||||||
|
|
||||||
/obj/machinery/atmospherics/pipe/manifold4w/hidden
|
/obj/machinery/atmospherics/pipe/manifold4w/hidden
|
||||||
icon_state = "map_4way"
|
icon_state = "map_4way"
|
||||||
level = 1
|
level = 1
|
||||||
alpha = 128 //set for the benefit of mapping - this is reset to opaque when the pipe is spawned in game
|
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.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)
|
||||||
|
|||||||
Reference in New Issue
Block a user