summaryrefslogtreecommitdiff
path: root/data/mods/bucket/init.lua
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-30 23:52:02 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-30 23:52:02 +0200
commit918c507a66aa5c05422d78a9ea30a455ddd3e124 (patch)
treee33440096e85bdace34bfefe61e41c1fc9a4fba0 /data/mods/bucket/init.lua
parent1b61ca412bc2ceba4a4b7a711a1decea59751657 (diff)
downloadminetest-918c507a66aa5c05422d78a9ea30a455ddd3e124.tar.gz
minetest-918c507a66aa5c05422d78a9ea30a455ddd3e124.tar.bz2
minetest-918c507a66aa5c05422d78a9ea30a455ddd3e124.zip
Move craftitem_place_item as minetest.craftitem_place_item in builtin.lua
Diffstat (limited to 'data/mods/bucket/init.lua')
-rw-r--r--data/mods/bucket/init.lua11
1 files changed, 3 insertions, 8 deletions
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)