mirror of
https://github.com/louisroyer/minetest-toolranks-extras.git
synced 2024-09-28 15:50:57 +02:00
Add hoe code
This commit is contained in:
parent
2f25b61449
commit
d167f8d2cf
20
hoe.lua
Normal file
20
hoe.lua
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
local function add_hoe(material)
|
||||||
|
local name = "farming:hoe_"..material
|
||||||
|
local desc = ItemStack(name):get_definition().description
|
||||||
|
minetest.override_item(name, {
|
||||||
|
original_description = desc,
|
||||||
|
description = toolranks.create_description(desc, 0, 1),
|
||||||
|
after_use = toolranks.new_afteruse
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
add_hoe("wood")
|
||||||
|
add_hoe("stone")
|
||||||
|
add_hoe("steel")
|
||||||
|
|
||||||
|
-- Following hoes are not available in creative inventory, but
|
||||||
|
-- it is possible to /give them
|
||||||
|
add_hoe("bronze")
|
||||||
|
add_hoe("mese")
|
||||||
|
add_hoe("diamond")
|
3
init.lua
Normal file
3
init.lua
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
local MP = minetest.get_modpath("toolranks_extras")
|
||||||
|
|
||||||
|
dofile(MP.."/hoe.lua")
|
2
mod.conf
2
mod.conf
@ -1,4 +1,4 @@
|
|||||||
name = toolranks-extras
|
name = toolranks_extras
|
||||||
description = Adds toolranks support for minetest-games’s mods (except default).
|
description = Adds toolranks support for minetest-games’s mods (except default).
|
||||||
depends = toolranks
|
depends = toolranks
|
||||||
optional_depends = farming
|
optional_depends = farming
|
||||||
|
Loading…
Reference in New Issue
Block a user