Fixed placing down bent pipes, unfastening HE pipes, fastening uncoupled junction pipe

This commit is contained in:
Tastyfish
2015-11-17 11:39:21 -05:00
parent 5526b70b96
commit 2694646a7e
4 changed files with 56 additions and 54 deletions
+25 -24
View File
@@ -43,31 +43,32 @@
if(SOUTHWEST)
initialize_directions = SOUTH|WEST
/obj/machinery/atmospherics/pipe/simple/initialize()
/obj/machinery/atmospherics/pipe/simple/initialize(initPipe = 1)
..()
normalize_dir()
var/N = 2
for(var/D in cardinal)
if(D & initialize_directions)
N--
for(var/obj/machinery/atmospherics/target in get_step(src, D))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if(!c)
continue
if(!node1 && N == 1)
target.connected_to = c
connected_to = c
node1 = target
break
if(!node2 && N == 0)
target.connected_to = c
connected_to = c
node2 = target
break
var/turf/T = loc // hide if turf is not intact
hide(T.intact)
update_icon()
if(initPipe)
normalize_dir()
var/N = 2
for(var/D in cardinal)
if(D & initialize_directions)
N--
for(var/obj/machinery/atmospherics/target in get_step(src, D))
if(target.initialize_directions & get_dir(target,src))
var/c = check_connect_types(target,src)
if(!c)
continue
if(!node1 && N == 1)
target.connected_to = c
connected_to = c
node1 = target
break
if(!node2 && N == 0)
target.connected_to = c
connected_to = c
node2 = target
break
var/turf/T = loc // hide if turf is not intact
hide(T.intact)
update_icon()
/obj/machinery/atmospherics/pipe/simple/check_pressure(pressure)
var/datum/gas_mixture/environment = loc.return_air()
@@ -59,21 +59,23 @@
initialize_directions_he = initialize_directions // The auto-detection from /pipe is good enough for a simple HE pipe
color = "#404040"
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/initialize()
normalize_dir()
var/N = 2
for(var/D in cardinal)
if(D & initialize_directions_he)
N--
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src, D))
if(target.initialize_directions_he & get_dir(target,src))
if(!node1 && N == 1)
node1 = target
break
if(!node2 && N == 0)
node2 = target
break
update_icon()
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/initialize(initPipe = 1)
..(0)
if(initPipe)
normalize_dir()
var/N = 2
for(var/D in cardinal)
if(D & initialize_directions_he)
N--
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src, D))
if(target.initialize_directions_he & get_dir(target,src))
if(!node1 && N == 1)
node1 = target
break
if(!node2 && N == 0)
node2 = target
break
update_icon()
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/hidden
level=1
@@ -107,6 +109,7 @@
initialize_directions_he = WEST
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/initialize()
..(0)
for(var/obj/machinery/atmospherics/target in get_step(src,initialize_directions))
if(target.initialize_directions & get_dir(target,src))
node1 = target
@@ -116,10 +119,6 @@
node2 = target
break
if(!node1 && !node2)
qdel(src)
return
update_icon()
return