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 if pointed_thing.type ~= "node" then
return return
end end
n = minetest.env:get_node(pointed_thing.under) local n = minetest.env:get_node(pointed_thing.under)
liquiddef = realtest.registered_liquids[n.name] local liquiddef = realtest.registered_liquids[n.name]
if liquiddef and n.name == liquiddef.source then 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"}) minetest.env:add_node(pointed_thing.under, {name="air"})
return {name=empty_name.."_with_"..liquiddef.name} return {name=full_name}
end end
end, end,
}) })