forked from mtcontrib/farming
deprecate bronze, mese and diamond hoe, increase uses for steel hoe
This commit is contained in:
parent
c4e88fc332
commit
a4e8182d90
24
hoes.lua
24
hoes.lua
@ -20,14 +20,6 @@ farming.register_hoe = function(name, def)
|
|||||||
def.inventory_image = "unknown_item.png"
|
def.inventory_image = "unknown_item.png"
|
||||||
end
|
end
|
||||||
|
|
||||||
if def.recipe == nil then
|
|
||||||
def.recipe = {
|
|
||||||
{"air","air",""},
|
|
||||||
{"","group:stick",""},
|
|
||||||
{"","group:stick",""}
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
if def.max_uses == nil then
|
if def.max_uses == nil then
|
||||||
def.max_uses = 30
|
def.max_uses = 30
|
||||||
end
|
end
|
||||||
@ -38,16 +30,18 @@ farming.register_hoe = function(name, def)
|
|||||||
inventory_image = def.inventory_image,
|
inventory_image = def.inventory_image,
|
||||||
on_use = function(itemstack, user, pointed_thing)
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
return farming.hoe_on_use(itemstack, user, pointed_thing, def.max_uses)
|
return farming.hoe_on_use(itemstack, user, pointed_thing, def.max_uses)
|
||||||
end
|
end,
|
||||||
|
groups = def.groups,
|
||||||
|
sound = {breaks = "default_tool_breaks"},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Register its recipe
|
-- Register its recipe
|
||||||
if def.material == nil then
|
if def.recipe then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = name:sub(2),
|
output = name:sub(2),
|
||||||
recipe = def.recipe
|
recipe = def.recipe
|
||||||
})
|
})
|
||||||
else
|
elseif def.material then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = name:sub(2),
|
output = name:sub(2),
|
||||||
recipe = {
|
recipe = {
|
||||||
@ -153,22 +147,22 @@ farming.register_hoe(":farming:hoe_steel", {
|
|||||||
farming.register_hoe(":farming:hoe_bronze", {
|
farming.register_hoe(":farming:hoe_bronze", {
|
||||||
description = S("Bronze Hoe"),
|
description = S("Bronze Hoe"),
|
||||||
inventory_image = "farming_tool_bronzehoe.png",
|
inventory_image = "farming_tool_bronzehoe.png",
|
||||||
max_uses = 220,
|
max_uses = 500,
|
||||||
material = "default:bronze_ingot"
|
groups = {not_in_creative_inventory = 1},
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.register_hoe(":farming:hoe_mese", {
|
farming.register_hoe(":farming:hoe_mese", {
|
||||||
description = S("Mese Hoe"),
|
description = S("Mese Hoe"),
|
||||||
inventory_image = "farming_tool_mesehoe.png",
|
inventory_image = "farming_tool_mesehoe.png",
|
||||||
max_uses = 350,
|
max_uses = 350,
|
||||||
material = "default:mese_crystal"
|
groups = {not_in_creative_inventory = 1},
|
||||||
})
|
})
|
||||||
|
|
||||||
farming.register_hoe(":farming:hoe_diamond", {
|
farming.register_hoe(":farming:hoe_diamond", {
|
||||||
description = S("Diamond Hoe"),
|
description = S("Diamond Hoe"),
|
||||||
inventory_image = "farming_tool_diamondhoe.png",
|
inventory_image = "farming_tool_diamondhoe.png",
|
||||||
max_uses = 500,
|
max_uses = 500,
|
||||||
material = "default:diamond"
|
groups = {not_in_creative_inventory = 1},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Toolranks support
|
-- Toolranks support
|
||||||
|
@ -26,5 +26,8 @@ if minetest.get_modpath("lucky_block") then
|
|||||||
{"dro", {"farming:cutting_board"}, 1},
|
{"dro", {"farming:cutting_board"}, 1},
|
||||||
{"dro", {"farming:juicer"}, 1},
|
{"dro", {"farming:juicer"}, 1},
|
||||||
{"dro", {"farming:mixing_bowl"}, 1},
|
{"dro", {"farming:mixing_bowl"}, 1},
|
||||||
|
{"dro", {"farming:hoe_bronze"}, 1},
|
||||||
|
{"dro", {"farming:hoe_mese"}, 1},
|
||||||
|
{"dro", {"farming:hoe_diamond"}, 1},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user