diff options
author | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-07 17:33:42 +0100 |
---|---|---|
committer | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-07 17:33:42 +0100 |
commit | 016f9de82f91b61a14ad1bc477ee18b501f77e39 (patch) | |
tree | 1551627d147e32054e6eb1a4ff79fe990b06a24b /new_flow_logic/abm_register.lua | |
parent | 608a9a69808ee58d05dc115b37af1d53b00f0241 (diff) |
new flow logic: abms.lua: refactor ABM logic into new master ABM, make balance_pressure() take current pressure and return new pressure
Diffstat (limited to 'new_flow_logic/abm_register.lua')
-rw-r--r-- | new_flow_logic/abm_register.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/new_flow_logic/abm_register.lua b/new_flow_logic/abm_register.lua index d8bb6cc..db6233f 100644 --- a/new_flow_logic/abm_register.lua +++ b/new_flow_logic/abm_register.lua @@ -16,7 +16,7 @@ local flowlogic = pipeworks.flowlogic -- register node list for the main logic function. -- see flowlogic.run() in abms.lua. ---[[ + local register_flowlogic_abm = function(nodename) minetest.register_abm({ nodenames = { nodename }, @@ -27,12 +27,13 @@ local register_flowlogic_abm = function(nodename) end }) end -]] +register.flowlogic = register_flowlogic_abm -- register a node name for the pressure balancing ABM. -- currently this only exists as a per-node function to allow nodes to be registered outside pipeworks. +--[[ local register_abm_balance = function(nodename) minetest.register_abm({ nodenames = { nodename }, @@ -44,6 +45,7 @@ local register_abm_balance = function(nodename) }) end register.balance = register_abm_balance +]] -- register a node for the input ABM. -- intakefn is run on the node to determine how much water can be taken (and update it's environment accordingly). |