Merge pull request #6 from xyzz/buckets_fix

Fix unknown buckets
This commit is contained in:
Oleg Matveev 2013-03-10 09:54:28 -07:00
commit 19fc9e8a11

View File

@ -145,11 +145,12 @@ for _, type in ipairs(buckets.types) do
if pointed_thing.type ~= "node" then
return
end
n = minetest.env:get_node(pointed_thing.under)
liquiddef = realtest.registered_liquids[n.name]
if liquiddef and n.name == liquiddef.source then
local n = minetest.env:get_node(pointed_thing.under)
local liquiddef = realtest.registered_liquids[n.name]
local full_name = empty_name.."_with_"..liquiddef.name
if liquiddef and n.name == liquiddef.source and minetest.registered_items[full_name] then
minetest.env:add_node(pointed_thing.under, {name="air"})
return {name=empty_name.."_with_"..liquiddef.name}
return {name=full_name}
end
end,
})