Heaters and freezers now check if there are other machines in their turf that have the same connection dirs.
This commit is contained in:
mwerezak
2015-08-15 18:28:09 -04:00
parent 4b21f5f8ad
commit 176e4232ca
2 changed files with 15 additions and 0 deletions

View File

@@ -43,6 +43,13 @@
node = target
break
//copied from pipe construction code since heaters/freezers don't use fittings and weren't doing this check - this all really really needs to be refactored someday.
//check that there are no incompatible pipes/machinery in our own location
for(var/obj/machinery/atmospherics/M in src.loc)
if(M != src && (M.initialize_directions & node_connect) && M.check_connect_types(M,src)) // matches at least one direction on either type of pipe & same connection type
node = null
break
update_icon()
/obj/machinery/atmospherics/unary/freezer/update_icon()

View File

@@ -39,11 +39,19 @@
var/node_connect = dir
//check that there is something to connect to
for(var/obj/machinery/atmospherics/target in get_step(src, node_connect))
if(target.initialize_directions & get_dir(target, src))
node = target
break
//copied from pipe construction code since heaters/freezers don't use fittings and weren't doing this check - this all really really needs to be refactored someday.
//check that there are no incompatible pipes/machinery in our own location
for(var/obj/machinery/atmospherics/M in src.loc)
if(M != src && (M.initialize_directions & node_connect) && M.check_connect_types(M,src)) // matches at least one direction on either type of pipe & same connection type
node = null
break
update_icon()