forked from mtcontrib/pipeworks
Merge pull request #23 from Uberi/master
Fix deployer in latest minetest.
This commit is contained in:
commit
7e328b1d11
@ -47,6 +47,7 @@ deployer_on = function(pos, node)
|
|||||||
local placer={}
|
local placer={}
|
||||||
function placer:get_player_name() return "deployer" end
|
function placer:get_player_name() return "deployer" end
|
||||||
function placer:getpos() return pos end
|
function placer:getpos() return pos end
|
||||||
|
function placer:get_player_control() return {jump=false,right=false,left=false,LMB=false,RMB=false,sneak=false,aux1=false,down=false,up=false} end
|
||||||
local stack2=minetest.item_place(stack,placer,{type="node", under=pos1, above=pos2})
|
local stack2=minetest.item_place(stack,placer,{type="node", under=pos1, above=pos2})
|
||||||
invlist[i]=stack2
|
invlist[i]=stack2
|
||||||
inv:set_list("main",invlist)
|
inv:set_list("main",invlist)
|
||||||
|
@ -30,6 +30,9 @@ minetest.register_node("pipeworks:filter", {
|
|||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
return inv:is_empty("main")
|
return inv:is_empty("main")
|
||||||
end,
|
end,
|
||||||
|
after_place_node = function(pos)
|
||||||
|
tube_scanforobjects(pos)
|
||||||
|
end,
|
||||||
mesecons={effector={action_on=function(pos,node)
|
mesecons={effector={action_on=function(pos,node)
|
||||||
minetest.registered_nodes[node.name].on_punch(pos,node,nil)
|
minetest.registered_nodes[node.name].on_punch(pos,node,nil)
|
||||||
end}},
|
end}},
|
||||||
@ -470,4 +473,4 @@ function go_next(pos,velocity,stack)
|
|||||||
velocity.z=chests[n].vect.z*speed
|
velocity.z=chests[n].vect.z*speed
|
||||||
end
|
end
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user