-- Minetest 0.4 mod: farming
-- See README.txt for licensing and other information.
+farming = {}
+
--
-- Soil
--
-- Hoes
--
-- turns nodes with group soil=1 into soil
-local function hoe_on_use(itemstack, user, pointed_thing, uses)
+function farming.hoe_on_use(itemstack, user, pointed_thing, uses)
local pt = pointed_thing
-- check if pointing at a node
if not pt then
inventory_image = "farming_tool_woodhoe.png",
on_use = function(itemstack, user, pointed_thing)
- return hoe_on_use(itemstack, user, pointed_thing, 30)
+ return farming.hoe_on_use(itemstack, user, pointed_thing, 30)
end,
})
inventory_image = "farming_tool_stonehoe.png",
on_use = function(itemstack, user, pointed_thing)
- return hoe_on_use(itemstack, user, pointed_thing, 90)
+ return farming.hoe_on_use(itemstack, user, pointed_thing, 90)
end,
})
inventory_image = "farming_tool_steelhoe.png",
on_use = function(itemstack, user, pointed_thing)
- return hoe_on_use(itemstack, user, pointed_thing, 200)
+ return farming.hoe_on_use(itemstack, user, pointed_thing, 200)
end,
})
inventory_image = "farming_tool_bronzehoe.png",
on_use = function(itemstack, user, pointed_thing)
- return hoe_on_use(itemstack, user, pointed_thing, 220)
+ return farming.hoe_on_use(itemstack, user, pointed_thing, 220)
end,
})