mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-30 15:38:02 +01:00
unifix take 2 (#19491)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#define LIST_NODE1 1
|
||||
#define LIST_NODE2 2
|
||||
|
||||
#define REBUILD_UNIVERSAL_NODE_LIST if(!length(universal_nodes)) {universal_nodes = new/list(PIPING_LAYER_AUX);universal_nodes[PIPING_LAYER_SUPPLY] = list(null, null);universal_nodes[PIPING_LAYER_REGULAR] = list(null, null);universal_nodes[PIPING_LAYER_SCRUBBER] = list(null, null);universal_nodes[PIPING_LAYER_FUEL] = list(null, null);universal_nodes[PIPING_LAYER_AUX] = list(null, null);};
|
||||
|
||||
//
|
||||
// Universal Pipe Adapter - Designed for connecting scrubbers, normal, and supply pipes together.
|
||||
// Visible varient
|
||||
@@ -20,19 +22,14 @@
|
||||
universal_destroy(universal_nodes)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/universal/atmos_init()
|
||||
if(!universal_nodes) // Done here, because other things can remotely call atmos_init() from around this pipe
|
||||
universal_nodes = new/list(PIPING_LAYER_AUX)
|
||||
universal_nodes[PIPING_LAYER_SUPPLY] = list(null, null)
|
||||
universal_nodes[PIPING_LAYER_REGULAR] = list(null, null)
|
||||
universal_nodes[PIPING_LAYER_SCRUBBER] = list(null, null)
|
||||
universal_nodes[PIPING_LAYER_FUEL] = list(null, null)
|
||||
universal_nodes[PIPING_LAYER_AUX] = list(null, null)
|
||||
REBUILD_UNIVERSAL_NODE_LIST
|
||||
universal_atmos_init(universal_nodes)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/universal/disconnect(obj/machinery/atmospherics/reference)
|
||||
universal_disconnect(universal_nodes, reference)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/visible/universal/pipeline_expansion()
|
||||
REBUILD_UNIVERSAL_NODE_LIST
|
||||
var/list/all_nodes = list()
|
||||
for(var/list/sublist in universal_nodes)
|
||||
all_nodes += sublist
|
||||
@@ -67,19 +64,14 @@
|
||||
universal_destroy(universal_nodes)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/universal/atmos_init()
|
||||
if(!universal_nodes) // Done here, because other things can remotely call atmos_init() from around this pipe
|
||||
universal_nodes = new/list(PIPING_LAYER_AUX)
|
||||
universal_nodes[PIPING_LAYER_SUPPLY] = list(null, null)
|
||||
universal_nodes[PIPING_LAYER_REGULAR] = list(null, null)
|
||||
universal_nodes[PIPING_LAYER_SCRUBBER] = list(null, null)
|
||||
universal_nodes[PIPING_LAYER_FUEL] = list(null, null)
|
||||
universal_nodes[PIPING_LAYER_AUX] = list(null, null)
|
||||
REBUILD_UNIVERSAL_NODE_LIST
|
||||
universal_atmos_init(universal_nodes)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/universal/disconnect(obj/machinery/atmospherics/reference)
|
||||
universal_disconnect(universal_nodes, reference)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/universal/pipeline_expansion()
|
||||
REBUILD_UNIVERSAL_NODE_LIST
|
||||
var/list/all_nodes = list()
|
||||
for(var/list/sublist in universal_nodes)
|
||||
all_nodes += sublist
|
||||
@@ -218,5 +210,7 @@
|
||||
else
|
||||
underlays += GLOB.icon_manager.get_atmos_icon("underlay", direction, color_cache_name(node), "retracted" + icon_connect_type)
|
||||
|
||||
#undef REBUILD_UNIVERSAL_NODE_LIST
|
||||
|
||||
#undef LIST_NODE1
|
||||
#undef LIST_NODE2
|
||||
|
||||
Reference in New Issue
Block a user