diff options
| author | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-07 22:07:30 +0100 | 
|---|---|---|
| committer | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-07 22:07:30 +0100 | 
| commit | 07e769d1b92661dc21bf85dee2f788f929fc444e (patch) | |
| tree | a82db79f78c6c90140ae0887608cd1511441080d | |
| parent | bd32b4fca2ee77da1b4b017d3e90a4013d4393a8 (diff) | |
new flow logic: abms.lua: pass finite mod flag to output handler callbacks in flowlogic.run_output()
| -rw-r--r-- | new_flow_logic/abms.lua | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/new_flow_logic/abms.lua b/new_flow_logic/abms.lua index 1605ea3..a4d5fc3 100644 --- a/new_flow_logic/abms.lua +++ b/new_flow_logic/abms.lua @@ -173,7 +173,7 @@ end  -- this is a constructor function, returning another function which satisfies the output helper requirements.  -- note that this does *not* take rotation into account.  flowlogic.helpers.make_neighbour_output_fixed = function(neighbours) -	return function(pos, node, currentpressure) +	return function(pos, node, currentpressure, finitemode)  		local taken = 0  		for _, offset in pairs(neighbours) do  			local npos = vector.add(pos, offset) @@ -214,7 +214,7 @@ flowlogic.run_output = function(pos, node, currentpressure, outputdef, finitemod  	local lower = outputdef.lower  	local result = currentpressure  	if currentpressure > lower then -		local takenpressure = outputdef.outputfn(pos, node, currentpressure) +		local takenpressure = outputdef.outputfn(pos, node, currentpressure, finitemode)  		local newpressure = currentpressure - takenpressure  		if newpressure < 0 then newpressure = 0 end  		result = newpressure | 
