From 918c507a66aa5c05422d78a9ea30a455ddd3e124 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Wed, 30 Nov 2011 23:52:02 +0200 Subject: Move craftitem_place_item as minetest.craftitem_place_item in builtin.lua --- data/mods/bucket/init.lua | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'data/mods/bucket') diff --git a/data/mods/bucket/init.lua b/data/mods/bucket/init.lua index aaed49ab1..013ff2408 100644 --- a/data/mods/bucket/init.lua +++ b/data/mods/bucket/init.lua @@ -1,8 +1,3 @@ -local craftitem_place_item = function(item, player, pos) - minetest.env:add_item(pos, 'CraftItem "' .. item .. '" 1') - return true -end - minetest.register_craft({ output = 'CraftItem "bucket" 1', recipe = { @@ -15,7 +10,7 @@ minetest.register_craftitem("bucket", { image = "bucket.png", stack_max = 1, liquids_pointable = true, - on_place_on_ground = craftitem_place_item, + on_place_on_ground = minetest.craftitem_place_item, on_use = function(item, player, pointed_thing) if pointed_thing.type == "node" then n = minetest.env:get_node(pointed_thing.under) @@ -37,7 +32,7 @@ minetest.register_craftitem("bucket_water", { image = "bucket_water.png", stack_max = 1, liquids_pointable = true, - on_place_on_ground = craftitem_place_item, + on_place_on_ground = minetest.craftitem_place_item, on_use = function(item, player, pointed_thing) if pointed_thing.type == "node" then n = minetest.env:get_node(pointed_thing.under) @@ -59,7 +54,7 @@ minetest.register_craftitem("bucket_lava", { image = "bucket_lava.png", stack_max = 1, liquids_pointable = true, - on_place_on_ground = craftitem_place_item, + on_place_on_ground = minetest.craftitem_place_item, on_use = function(item, player, pointed_thing) if pointed_thing.type == "node" then n = minetest.env:get_node(pointed_thing.under) -- cgit v1.2.3