Hot fix -dont send fluid from fluid separator
This commit is contained in:
parent
33f7fd586b
commit
efc6e02d15
|
@ -1504,7 +1504,7 @@ for i = 1, #table_all_machines, 1 do
|
||||||
end
|
end
|
||||||
local rotation = minetest.get_node(pos).param2 % 32 --get rotattion ( return int )
|
local rotation = minetest.get_node(pos).param2 % 32 --get rotattion ( return int )
|
||||||
if rotation==0 then --z+1
|
if rotation==0 then --z+1
|
||||||
if minetest.get_item_group((minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1})).name,"fluid_pipe") then --get from pipe steam
|
if minetest.get_item_group((minetest.get_node({x=pos.x,y=pos.y,z=pos.z+1})).name,"owl_tech_fluid_pipe") then --get from pipe steam
|
||||||
local meta_up = minetest.get_meta({x=pos.x,y=pos.y,z=pos.z+1})
|
local meta_up = minetest.get_meta({x=pos.x,y=pos.y,z=pos.z+1})
|
||||||
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta_up,1)
|
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta_up,1)
|
||||||
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta))
|
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta))
|
||||||
|
@ -1514,10 +1514,10 @@ for i = 1, #table_all_machines, 1 do
|
||||||
owl_tech.remove_fluid_in_node_pull(meta_up,remove_amount,inde_pull)
|
owl_tech.remove_fluid_in_node_pull(meta_up,remove_amount,inde_pull)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for i = -1, 1, -1 do
|
for i = -1, 1, 2 do
|
||||||
if minetest.get_item_group((minetest.get_node({x=pos.x+i,y=pos.y,z=pos.z})).name,"fluid_pipe") then --sand in pipe
|
if minetest.get_item_group((minetest.get_node({x=pos.x+i,y=pos.y,z=pos.z})).name,"owl_tech_fluid_pipe") then --sand in pipe
|
||||||
local meta_up = minetest.get_meta({x=pos.x+i,y=pos.y,z=pos.z})
|
local meta_up = minetest.get_meta({x=pos.x+i,y=pos.y,z=pos.z})
|
||||||
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta,3)
|
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta,2)
|
||||||
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta_up,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta_up,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
||||||
local can_do2 ,inde_pull_2 , remove_amount =owl_tech.test_remove_fluid_in_any_pulls(meta,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
local can_do2 ,inde_pull_2 , remove_amount =owl_tech.test_remove_fluid_in_any_pulls(meta,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
||||||
if can_do and can_do2 then
|
if can_do and can_do2 then
|
||||||
|
@ -1530,7 +1530,7 @@ for i = 1, #table_all_machines, 1 do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if rotation==2 then --z-1
|
if rotation==2 then --z-1
|
||||||
if minetest.get_item_group((minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1})).name,"fluid_pipe") then --get from pipe steam
|
if minetest.get_item_group((minetest.get_node({x=pos.x,y=pos.y,z=pos.z-1})).name,"owl_tech_fluid_pipe") then --get from pipe steam
|
||||||
local meta_up = minetest.get_meta({x=pos.x,y=pos.y,z=pos.z-1})
|
local meta_up = minetest.get_meta({x=pos.x,y=pos.y,z=pos.z-1})
|
||||||
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta_up,1)
|
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta_up,1)
|
||||||
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta))
|
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta))
|
||||||
|
@ -1540,10 +1540,10 @@ for i = 1, #table_all_machines, 1 do
|
||||||
owl_tech.remove_fluid_in_node_pull(meta_up,remove_amount,inde_pull)
|
owl_tech.remove_fluid_in_node_pull(meta_up,remove_amount,inde_pull)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for i = -1, 1, -1 do
|
for i = -1, 1, 2 do
|
||||||
if minetest.get_item_group((minetest.get_node({x=pos.x+i,y=pos.y,z=pos.z})).name,"fluid_pipe") then --sand in pipe
|
if minetest.get_item_group((minetest.get_node({x=pos.x+i,y=pos.y,z=pos.z})).name,"owl_tech_fluid_pipe") then --sand in pipe
|
||||||
local meta_up = minetest.get_meta({x=pos.x+i,y=pos.y,z=pos.z})
|
local meta_up = minetest.get_meta({x=pos.x+i,y=pos.y,z=pos.z})
|
||||||
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta,3)
|
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta,2)
|
||||||
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta_up,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta_up,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
||||||
local can_do2 ,inde_pull_2 , remove_amount =owl_tech.test_remove_fluid_in_any_pulls(meta,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
local can_do2 ,inde_pull_2 , remove_amount =owl_tech.test_remove_fluid_in_any_pulls(meta,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
||||||
if can_do and can_do2 then
|
if can_do and can_do2 then
|
||||||
|
@ -1556,9 +1556,9 @@ for i = 1, #table_all_machines, 1 do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if rotation==3 then --x+1
|
if rotation==3 then --x+1
|
||||||
if minetest.get_item_group((minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z})).name,"fluid_pipe") then --get from pipe steam
|
if minetest.get_item_group((minetest.get_node({x=pos.x-1,y=pos.y,z=pos.z})).name,"owl_tech_fluid_pipe") then --get from pipe steam
|
||||||
local meta_up = minetest.get_meta({x=pos.x-1,y=pos.y,z=pos.z})
|
local meta_up = minetest.get_meta({x=pos.x-1,y=pos.y,z=pos.z})
|
||||||
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta_up,1)
|
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta_up,2)
|
||||||
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta))
|
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta))
|
||||||
local can_do2 ,inde_pull_2 , remove_amount =owl_tech.test_remove_fluid_in_any_pulls(meta_up,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
local can_do2 ,inde_pull_2 , remove_amount =owl_tech.test_remove_fluid_in_any_pulls(meta_up,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
||||||
if can_do and can_do2 and inde_pull==1 then
|
if can_do and can_do2 and inde_pull==1 then
|
||||||
|
@ -1566,10 +1566,10 @@ for i = 1, #table_all_machines, 1 do
|
||||||
owl_tech.remove_fluid_in_node_pull(meta_up,remove_amount,inde_pull)
|
owl_tech.remove_fluid_in_node_pull(meta_up,remove_amount,inde_pull)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for i = -1, 1, -1 do
|
for i = -1, 1, 2 do
|
||||||
if minetest.get_item_group((minetest.get_node({x=pos.x,y=pos.y,z=pos.z+i})).name,"fluid_pipe") then --sand in pipe
|
if minetest.get_item_group((minetest.get_node({x=pos.x,y=pos.y,z=pos.z+i})).name,"owl_tech_fluid_pipe") then --sand in pipe
|
||||||
local meta_up = minetest.get_meta({x=pos.x,y=pos.y,z=pos.z+i})
|
local meta_up = minetest.get_meta({x=pos.x,y=pos.y,z=pos.z+i})
|
||||||
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta,3)
|
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta,2)
|
||||||
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta_up,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta_up,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
||||||
local can_do2 ,inde_pull_2 , remove_amount =owl_tech.test_remove_fluid_in_any_pulls(meta,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
local can_do2 ,inde_pull_2 , remove_amount =owl_tech.test_remove_fluid_in_any_pulls(meta,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
||||||
if can_do and can_do2 then
|
if can_do and can_do2 then
|
||||||
|
@ -1582,7 +1582,7 @@ for i = 1, #table_all_machines, 1 do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if rotation==1 then --x-1
|
if rotation==1 then --x-1
|
||||||
if minetest.get_item_group((minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z})).name,"fluid_pipe") then --get from pipe steam
|
if minetest.get_item_group((minetest.get_node({x=pos.x+1,y=pos.y,z=pos.z})).name,"owl_tech_fluid_pipe") then --get from pipe steam
|
||||||
local meta_up = minetest.get_meta({x=pos.x+1,y=pos.y,z=pos.z})
|
local meta_up = minetest.get_meta({x=pos.x+1,y=pos.y,z=pos.z})
|
||||||
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta_up,1)
|
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta_up,1)
|
||||||
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta))
|
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta))
|
||||||
|
@ -1592,10 +1592,10 @@ for i = 1, #table_all_machines, 1 do
|
||||||
owl_tech.remove_fluid_in_node_pull(meta_up,remove_amount,inde_pull)
|
owl_tech.remove_fluid_in_node_pull(meta_up,remove_amount,inde_pull)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for i = -1, 1, -1 do
|
for i = -1, 1, 2 do
|
||||||
if minetest.get_item_group((minetest.get_node({x=pos.x,y=pos.y,z=pos.z+i})).name,"fluid_pipe") then --sand in pipe
|
if minetest.get_item_group((minetest.get_node({x=pos.x,y=pos.y,z=pos.z+i})).name,"owl_tech_fluid_pipe")>0 then --sand in pipe
|
||||||
local meta_up = minetest.get_meta({x=pos.x,y=pos.y,z=pos.z+i})
|
local meta_up = minetest.get_meta({x=pos.x,y=pos.y,z=pos.z+i})
|
||||||
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta,3)
|
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta,2)
|
||||||
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta_up,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta_up,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
||||||
local can_do2 ,inde_pull_2 , remove_amount =owl_tech.test_remove_fluid_in_any_pulls(meta,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
local can_do2 ,inde_pull_2 , remove_amount =owl_tech.test_remove_fluid_in_any_pulls(meta,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
||||||
if can_do and can_do2 then
|
if can_do and can_do2 then
|
||||||
|
@ -1607,7 +1607,7 @@ for i = 1, #table_all_machines, 1 do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if minetest.get_item_group((minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})).name,"fluid_pipe") then --sand in pipe
|
if minetest.get_item_group((minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})).name,"owl_tech_fluid_pipe") then --sand in pipe
|
||||||
local meta_up = minetest.get_meta({x=pos.x,y=pos.y-1,z=pos.z})
|
local meta_up = minetest.get_meta({x=pos.x,y=pos.y-1,z=pos.z})
|
||||||
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta,3)
|
local fluid_name_to_send = owl_tech.get_pull_fluid_name(meta,3)
|
||||||
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta_up,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
local can_do ,inde_pull =owl_tech.test_add_fluid_in_any_pulls(meta_up,fluid_name_to_send,owl_tech.get_fluid_sand_in_tick(meta_up))
|
||||||
|
|
|
@ -60,7 +60,7 @@ minetest.register_node("owl_tech:bronze_tank", {
|
||||||
inv:set_size("input_in_add", 1) --for output
|
inv:set_size("input_in_add", 1) --for output
|
||||||
inv:set_size("dst_add", 1) --for output
|
inv:set_size("dst_add", 1) --for output
|
||||||
local timer =minetest.get_node_timer(pos)
|
local timer =minetest.get_node_timer(pos)
|
||||||
meta:set_string("infotext",owl_tech.get_pull_volume(meta,1).."--"..owl_tech.get_pull_max_volume(meta,1))
|
meta:set_string("infotext",owl_tech.get_pull_volume(meta,1).."--"..owl_tech.get_pull_fluid_name(meta,1).."--"..owl_tech.get_pull_max_volume(meta,1))
|
||||||
set_formspect_tank(meta)
|
set_formspect_tank(meta)
|
||||||
timer:start(0.2)
|
timer:start(0.2)
|
||||||
end,
|
end,
|
||||||
|
@ -132,7 +132,7 @@ minetest.register_node("owl_tech:bronze_tank", {
|
||||||
end
|
end
|
||||||
owl_tech.delit_name_fluid_if_0(meta)
|
owl_tech.delit_name_fluid_if_0(meta)
|
||||||
set_formspect_tank(meta)
|
set_formspect_tank(meta)
|
||||||
meta:set_string("infotext",owl_tech.get_pull_volume(meta,1).."--"..owl_tech.get_pull_max_volume(meta,1))
|
meta:set_string("infotext",owl_tech.get_pull_volume(meta,1).."--"..owl_tech.get_pull_fluid_name(meta,1).."--"..owl_tech.get_pull_max_volume(meta,1))
|
||||||
timer:start(0.2)
|
timer:start(0.2)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue