aboutsummaryrefslogtreecommitdiff
path: root/src/sqlite/sqlite3.h
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2014-12-12 14:07:49 -0500
committerkwolekr <kwolekr@minetest.net>2014-12-12 14:08:04 -0500
commitcf8213ea827f38ae5d4b8ef16c396545e3e59657 (patch)
treee739591704b1776002baa1bde7a4ff86de5f06ad /src/sqlite/sqlite3.h
parentcec141adc1fd0845e27df9b0c88d979dd765e76f (diff)
downloadminetest-cf8213ea827f38ae5d4b8ef16c396545e3e59657.tar.gz
minetest-cf8213ea827f38ae5d4b8ef16c396545e3e59657.tar.bz2
minetest-cf8213ea827f38ae5d4b8ef16c396545e3e59657.zip
Add minetest.clear_registered_decorations() and clear_registered_ores()
Diffstat (limited to 'src/sqlite/sqlite3.h')
0 files changed, 0 insertions, 0 deletions
ter", "bucket:bucket_water") minetest.register_alias("bucket_lava", "bucket:bucket_lava") minetest.register_craft({ output = 'bucket:bucket_empty 1', recipe = { {'default:steel_ingot', '', 'default:steel_ingot'}, {'', 'default:steel_ingot', ''}, } }) bucket = {} bucket.liquids = {} -- Register a new liquid -- source = name of the source node -- flowing = name of the flowing node -- itemname = name of the new bucket item (or nil if liquid is not takeable) -- inventory_image = texture of the new bucket item (ignored if itemname == nil) -- This function can be called from any mod (that depends on bucket). function bucket.register_liquid(source, flowing, itemname, inventory_image) bucket.liquids[source] = { source = source, flowing = flowing, itemname = itemname, } bucket.liquids[flowing] = bucket.liquids[source] if itemname ~= nil then minetest.register_craftitem(itemname, { inventory_image = inventory_image, stack_max = 1, liquids_pointable = true, on_use = function(itemstack, user, pointed_thing) -- Must be pointing to node if pointed_thing.type ~= "node" then return end -- Check if pointing to a liquid n = minetest.get_node(pointed_thing.under) if bucket.liquids[n.name] == nil then -- Not a liquid minetest.add_node(pointed_thing.above, {name=source}) elseif n.name ~= source then -- It's a liquid minetest.add_node(pointed_thing.under, {name=source}) end return {name="bucket:bucket_empty"} end }) end end minetest.register_craftitem("bucket:bucket_empty", { inventory_image = "bucket.png", stack_max = 1, liquids_pointable = true, on_use = function(itemstack, user, pointed_thing) -- Must be pointing to node if pointed_thing.type ~= "node" then return end -- Check if pointing to a liquid source n = minetest.get_node(pointed_thing.under) liquiddef = bucket.liquids[n.name]