diff options
| author | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-16 23:39:30 +0100 | 
|---|---|---|
| committer | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-16 23:39:30 +0100 | 
| commit | c55374cdfadd9cc04db63908c7ac9cf8ec6aff21 (patch) | |
| tree | 7c0489d07a5c7212f36a1867039eb172bb64791f | |
| parent | fd978204dd5c72d350ba0d31ec43c628c46599f3 (diff) | |
devices.lua: convert pump to use new directional flow class
| -rw-r--r-- | devices.lua | 5 | 
1 files changed, 2 insertions, 3 deletions
| diff --git a/devices.lua b/devices.lua index 5203bf3..f1d1dad 100644 --- a/devices.lua +++ b/devices.lua @@ -161,11 +161,10 @@ for s in ipairs(states) do  			local fdir = node.param2  			minetest.swap_node(pos, { name = "pipeworks:pump_"..states[3-s], param2 = fdir })  		end, -		-- FIXME - does this preserve metadata? need to look at this  		on_rotate = screwdriver.rotate_simple  	}) -	-- FIXME: currently a simple flow device, but needs directionality checking -	new_flow_logic_register.simple(pumpname) +	-- FIXME: this currently assumes that pumps can only rotate around the fixed axis pointing Y+. +	new_flow_logic_register.directional(pumpname, function(node) return { {x=0,y=1,z=0} } end)  	local pump_drive = 4  	if states[s] ~= "off" then  		new_flow_logic_register.intake_simple(pumpname, pump_drive) | 
