From 91d057fcab8bf2caad295148201f1414e935def7 Mon Sep 17 00:00:00 2001 From: thetaepsilon-gamedev Date: Sat, 7 Oct 2017 19:42:49 +0100 Subject: new flow logic: tear out old abm registration code --- new_flow_logic/abm_register.lua | 65 ----------------------------------------- 1 file changed, 65 deletions(-) (limited to 'new_flow_logic') diff --git a/new_flow_logic/abm_register.lua b/new_flow_logic/abm_register.lua index dbd37e6..ac7b2e3 100644 --- a/new_flow_logic/abm_register.lua +++ b/new_flow_logic/abm_register.lua @@ -28,68 +28,3 @@ local register_flowlogic_abm = function(nodename) }) 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 }, - interval = 1, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - flowlogic.balance_pressure(pos, node) - end - }) -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). --- maxpressure is the maximum pressure that this input can drive, beyond which pressure will not be raised. ---[[ -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) - flowlogic.run_input(pos, node, maxpressure, intakefn) - end - }) -end -register.input = register_abm_input -]] - --- register a node for the output ABM. --- threshold determines the minimum pressure, over which outputfn is called. --- outputfn is then given the current pressure, and returns the pressure relieved by the output process. --- outputfn is expected to update environment, nearby world etc. as appropriate for the node. ---[[ -local register_abm_output = function(nodename, threshold, outputfn) - minetest.register_abm({ - nodenames = { nodename }, - interval = 1, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - flowlogic.run_output(pos, node, threshold, outputfn) - end - }) -end -register.output = register_abm_output -]] - --- old spigot ABM code, not yet migrated ---[[ - minetest.register_abm({ - nodenames = { spigot_on, spigot_off }, - interval = 1, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - pipeworks.run_spigot_output(pos, node) - end - }) -]] -- cgit v1.2.3