mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-23 12:06:22 +01:00
Replaces awful connect type system with bitflags
This commit is contained in:
@@ -67,19 +67,13 @@ obj/machinery/atmospherics/binary
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
var/c = check_connect_types(target,src)
|
||||
if (c)
|
||||
target.connected_to = c
|
||||
src.connected_to = c
|
||||
if (check_connect_types(target,src))
|
||||
node1 = target
|
||||
break
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
var/c = check_connect_types(target,src)
|
||||
if (c)
|
||||
target.connected_to = c
|
||||
src.connected_to = c
|
||||
if (check_connect_types(target,src))
|
||||
node2 = target
|
||||
break
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
active_power_usage = 7500 //This also doubles as a measure of how powerful the pump is, in Watts. 7500 W ~ 10 HP
|
||||
var/last_power_draw = 0
|
||||
|
||||
connect_types = list(1,2,3) //connects to regular, supply and scrubbers pipes
|
||||
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY|CONNECT_TYPE_SCRUBBER //connects to regular, supply and scrubbers pipes
|
||||
|
||||
var/on = 0
|
||||
var/pump_direction = 1 //0 = siphoning, 1 = releasing
|
||||
|
||||
@@ -248,10 +248,7 @@
|
||||
continue
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src, P.dir))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
var/c = check_connect_types(target,src)
|
||||
if (c)
|
||||
target.connected_to = c
|
||||
src.connected_to = c
|
||||
if (check_connect_types(target,src))
|
||||
P.node = target
|
||||
break
|
||||
|
||||
|
||||
@@ -81,10 +81,7 @@
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
var/c = check_connect_types(target,src)
|
||||
if (c)
|
||||
target.connected_to = c
|
||||
src.connected_to = c
|
||||
if (check_connect_types(target,src))
|
||||
node = target
|
||||
break
|
||||
|
||||
|
||||
@@ -82,27 +82,18 @@ obj/machinery/atmospherics/trinary
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
var/c = check_connect_types(target,src)
|
||||
if (c)
|
||||
target.connected_to = c
|
||||
src.connected_to = c
|
||||
if (check_connect_types(target,src))
|
||||
node1 = target
|
||||
break
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
var/c = check_connect_types(target,src)
|
||||
if (c)
|
||||
target.connected_to = c
|
||||
src.connected_to = c
|
||||
if (check_connect_types(target,src))
|
||||
node2 = target
|
||||
break
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node3_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
var/c = check_connect_types(target,src)
|
||||
if (c)
|
||||
target.connected_to = c
|
||||
src.connected_to = c
|
||||
if (check_connect_types(target,src))
|
||||
node3 = target
|
||||
break
|
||||
|
||||
|
||||
@@ -199,26 +199,17 @@
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
var/c = check_connect_types(target,src)
|
||||
if (c)
|
||||
target.connected_to = c
|
||||
src.connected_to = c
|
||||
if (check_connect_types(target,src))
|
||||
node1 = target
|
||||
break
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node2_dir))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
var/c = check_connect_types(target,src)
|
||||
if (c)
|
||||
target.connected_to = c
|
||||
src.connected_to = c
|
||||
if (check_connect_types(target,src))
|
||||
node2 = target
|
||||
break
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node3_dir))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
var/c = check_connect_types(target,src)
|
||||
if (c)
|
||||
target.connected_to = c
|
||||
src.connected_to = c
|
||||
if (check_connect_types(target,src))
|
||||
node3 = target
|
||||
break
|
||||
|
||||
|
||||
@@ -46,10 +46,7 @@
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
var/c = check_connect_types(target,src)
|
||||
if (c)
|
||||
target.connected_to = c
|
||||
src.connected_to = c
|
||||
if (check_connect_types(target,src))
|
||||
node = target
|
||||
break
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
idle_power_usage = 150 //internal circuitry, friction losses and stuff
|
||||
active_power_usage = 7500 //This also doubles as a measure of how powerful the pump is, in Watts. 7500 W ~ 10 HP
|
||||
|
||||
connect_types = list(1,2) //connects to regular and supply pipes
|
||||
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY //connects to regular and supply pipes
|
||||
|
||||
var/area/initial_loc
|
||||
level = 1
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
active_power_usage = 7500 //This also doubles as a measure of how powerful the pump is, in Watts. 7500 W ~ 10 HP
|
||||
var/last_power_draw = 0
|
||||
|
||||
connect_types = list(1,3) //connects to regular and scrubber pipes
|
||||
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SCRUBBER //connects to regular and scrubber pipes
|
||||
|
||||
level = 1
|
||||
|
||||
|
||||
@@ -160,18 +160,12 @@
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
var/c = check_connect_types(target,src)
|
||||
if (c)
|
||||
target.connected_to = c
|
||||
src.connected_to = c
|
||||
if (check_connect_types(target,src))
|
||||
node1 = target
|
||||
break
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node2_dir))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
var/c = check_connect_types(target,src)
|
||||
if (c)
|
||||
target.connected_to = c
|
||||
src.connected_to = c
|
||||
if (check_connect_types(target,src))
|
||||
node2 = target
|
||||
break
|
||||
|
||||
|
||||
Reference in New Issue
Block a user