summaryrefslogtreecommitdiff
path: root/pipeworks/new_flow_logic/flowable_node_registry.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-10-27 15:13:31 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-10-27 15:13:31 -0400
commit6281dc744dc3951234931a9f44c3bdd353f79df7 (patch)
tree0ead0d0d18be58bed7480cb9a5ea1495230c568f /pipeworks/new_flow_logic/flowable_node_registry.lua
parent2e6082ccdbd121cd5fc0f82a931ac01ac00dcb76 (diff)
downloaddreambuilder_modpack-6281dc744dc3951234931a9f44c3bdd353f79df7.tar
dreambuilder_modpack-6281dc744dc3951234931a9f44c3bdd353f79df7.tar.gz
dreambuilder_modpack-6281dc744dc3951234931a9f44c3bdd353f79df7.tar.bz2
dreambuilder_modpack-6281dc744dc3951234931a9f44c3bdd353f79df7.tar.xz
dreambuilder_modpack-6281dc744dc3951234931a9f44c3bdd353f79df7.zip
updated boost cart, homedecor modpack, castles modpack, currency, farming-redo,
maptools, mesecons, moreblocks, moreores, pipeworks, quartz
Diffstat (limited to 'pipeworks/new_flow_logic/flowable_node_registry.lua')
-rw-r--r--pipeworks/new_flow_logic/flowable_node_registry.lua48
1 files changed, 48 insertions, 0 deletions
diff --git a/pipeworks/new_flow_logic/flowable_node_registry.lua b/pipeworks/new_flow_logic/flowable_node_registry.lua
new file mode 100644
index 0000000..2523803
--- /dev/null
+++ b/pipeworks/new_flow_logic/flowable_node_registry.lua
@@ -0,0 +1,48 @@
+-- registry of flowable node behaviours in new flow logic
+-- written 2017 by thetaepsilon
+
+-- the actual registration functions which edit these tables can be found in flowable_node_registry_install.lua
+-- this is because the ABM code needs to inspect these tables,
+-- but the registration code needs to reference said ABM code.
+-- so those functions were split out to resolve a circular dependency.
+
+
+
+pipeworks.flowables = {}
+pipeworks.flowables.list = {}
+pipeworks.flowables.list.all = {}
+-- pipeworks.flowables.list.nodenames = {}
+
+-- simple flowables - balance pressure in any direction
+pipeworks.flowables.list.simple = {}
+pipeworks.flowables.list.simple_nodenames = {}
+
+-- simple intakes - try to absorb any adjacent water nodes
+pipeworks.flowables.inputs = {}
+pipeworks.flowables.inputs.list = {}
+pipeworks.flowables.inputs.nodenames = {}
+
+-- outputs - takes pressure from pipes and update world to do something with it
+pipeworks.flowables.outputs = {}
+pipeworks.flowables.outputs.list = {}
+-- not currently any nodenames arraylist for this one as it's not currently needed.
+
+-- nodes with registered node transitions
+-- nodes will be switched depending on pressure level
+pipeworks.flowables.transitions = {}
+pipeworks.flowables.transitions.list = {} -- master list
+pipeworks.flowables.transitions.simple = {} -- nodes that change based purely on pressure
+pipeworks.flowables.transitions.mesecons = {} -- table of mesecons rules to apply on transition
+
+
+
+-- checks if a given node can flow in a given direction.
+-- used to implement directional devices such as pumps,
+-- which only visually connect in a certain direction.
+-- node is the usual name + param structure.
+-- direction is an x/y/z vector of the flow direction;
+-- this function answers the question "can this node flow in this direction?"
+pipeworks.flowables.flow_check = function(node, direction)
+ minetest.log("warning", "pipeworks.flowables.flow_check() stub!")
+ return true
+end