Pipes should now only be considered overlapping if they share connection types.
This commit is contained in:
PsiOmega
2014-11-17 12:27:29 +01:00
parent ce3618a200
commit df63c63a41

View File

@@ -6,7 +6,7 @@
src << "Only administrators may use this command."
return
feedback_add_details("admin_verb","CP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(alert("WARNING: This command should not be run on a live server. Do you want to continue?", "Check Piping", "No", "Yes") == "No")
return
@@ -30,11 +30,12 @@
next_turf:
for(var/turf/T in world)
for(var/dir in cardinal)
var/check = 0
var/list/connect_types = list(1 = 0, 2 = 0, 3 = 0)
for(var/obj/machinery/atmospherics/pipe in T)
if(dir & pipe.initialize_directions)
check++
if(check > 1)
for(var/connect_type in pipe.connect_types)
connect_types[connect_type] += 1
if(connect_types[1] > 1 || connect_types[2] > 1 || connect_types[3] > 1)
usr << "Overlapping pipe ([pipe.name]) located at [T.x],[T.y],[T.z] ([get_area(T)])"
continue next_turf
usr << "Done"