diff options
author | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-01 00:44:14 +0100 |
---|---|---|
committer | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-01 00:44:14 +0100 |
commit | 3486ee319ee4fafbf83c583dd9fedfaed92db7c4 (patch) | |
tree | f58d533f4ddb2e891f1dd6c19f1ed52ba7791866 /new_flow_logic/abm_register.lua | |
parent | aee23d76426734892f1d7129c02c56b58cc813af (diff) |
abms.lua: refactor and generalise run_pump_intake() to allow passing custom intake functions
Diffstat (limited to 'new_flow_logic/abm_register.lua')
-rw-r--r-- | new_flow_logic/abm_register.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/new_flow_logic/abm_register.lua b/new_flow_logic/abm_register.lua index 505ca4b..57c8a47 100644 --- a/new_flow_logic/abm_register.lua +++ b/new_flow_logic/abm_register.lua @@ -24,13 +24,13 @@ register.balance = register_abm_balance -- register a node for the pump ABM. -- maxpressure is the maximum pressure that this pump can drive. -local register_abm_input = function(nodename, maxpressure) +local register_abm_input = function(nodename, maxpressure, intakefn) minetest.register_abm({ nodenames = { nodename }, interval = 1, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) - pipeworks.flowlogic.run_pump_intake(pos, node, maxpressure) + pipeworks.flowlogic.run_input(pos, node, maxpressure, intakefn) end }) end |