translate many nalc_* mods
and use function to register toolranks
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
local S = nalc_default.get_translator
|
||||
|
||||
minetest.register_craft(
|
||||
{ output = 'nalc:pick_gold',
|
||||
recipe = {
|
||||
@ -44,7 +46,7 @@ minetest.register_craft(
|
||||
minetest.register_tool(
|
||||
":nalc:pick_gold",
|
||||
{
|
||||
description = "Golden Pickaxe",
|
||||
description = S("Golden Pickaxe"),
|
||||
inventory_image = "default_tool_goldpick.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.2,
|
||||
@ -60,7 +62,7 @@ minetest.register_tool(
|
||||
minetest.register_tool(
|
||||
":nalc:shovel_gold",
|
||||
{
|
||||
description = "Golden Shovel",
|
||||
description = S("Golden Shovel"),
|
||||
inventory_image = "default_tool_goldshovel.png",
|
||||
wield_image = "default_tool_goldshovel.png^[transformR90",
|
||||
tool_capabilities = {
|
||||
@ -76,7 +78,7 @@ minetest.register_tool(
|
||||
minetest.register_tool(
|
||||
":nalc:axe_gold",
|
||||
{
|
||||
description = "Golden Axe",
|
||||
description = S("Golden Axe"),
|
||||
inventory_image = "default_tool_goldaxe.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1.2,
|
||||
@ -92,7 +94,7 @@ minetest.register_tool(
|
||||
minetest.register_tool(
|
||||
":nalc:sword_gold",
|
||||
{
|
||||
description = "Golden Sword",
|
||||
description = S("Golden Sword"),
|
||||
inventory_image = "default_tool_goldsword.png",
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 1,
|
||||
@ -106,28 +108,10 @@ minetest.register_tool(
|
||||
|
||||
-- Toolranks
|
||||
if minetest.get_modpath("toolranks") then
|
||||
|
||||
minetest.override_item(
|
||||
"nalc:pick_gold",
|
||||
{
|
||||
original_description = "Golden Pickaxe",
|
||||
description = toolranks.create_description("Golden Pickaxe", 0, 1),
|
||||
after_use = toolranks.new_afteruse
|
||||
})
|
||||
minetest.override_item(
|
||||
"nalc:axe_gold",
|
||||
{
|
||||
original_description = "Golden Axe",
|
||||
description = toolranks.create_description("Golden Axe", 0, 1),
|
||||
after_use = toolranks.new_afteruse
|
||||
})
|
||||
minetest.override_item(
|
||||
"nalc:shovel_gold",
|
||||
{
|
||||
original_description = "Golden Shovel",
|
||||
description = toolranks.create_description("Golden Shovel", 0, 1),
|
||||
after_use = toolranks.new_afteruse
|
||||
})
|
||||
toolranks.add_tool("nalc:pick_gold")
|
||||
toolranks.add_tool("nalc:shovel_gold")
|
||||
toolranks.add_tool("nalc:axe_gold")
|
||||
toolranks.add_tool("nalc:sword_gold")
|
||||
end
|
||||
|
||||
-- Aliases
|
||||
|
Reference in New Issue
Block a user