translate many nalc_* mods
and use function to register toolranks
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
local S = nalc_default.get_translator
|
||||
|
||||
default.register_fence(
|
||||
":nalc:fence_cobble",
|
||||
{
|
||||
description = "Cobble Fence",
|
||||
description = S("Cobble Fence"),
|
||||
texture = "default_fence_cobble.png",
|
||||
material = "default:cobble",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
@ -11,7 +13,7 @@ default.register_fence(
|
||||
default.register_fence(
|
||||
":nalc:fence_desert_cobble",
|
||||
{
|
||||
description = "Desert Cobble Fence",
|
||||
description = S("Desert Cobble Fence"),
|
||||
texture = "default_fence_desert_cobble.png",
|
||||
material = "default:desert_cobble",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
@ -21,7 +23,7 @@ default.register_fence(
|
||||
default.register_fence(
|
||||
":nalc:fence_steelblock",
|
||||
{
|
||||
description = "Steel Block Fence",
|
||||
description = S("Steel Block Fence"),
|
||||
texture = "default_fence_steelblock.png",
|
||||
material = "default:steelblock",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
@ -31,7 +33,7 @@ default.register_fence(
|
||||
default.register_fence(
|
||||
":nalc:fence_brick",
|
||||
{
|
||||
description = "Brick Fence",
|
||||
description = S("Brick Fence"),
|
||||
texture = "default_fence_brick.png",
|
||||
material = "default:brick",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
|
@ -1,5 +1,9 @@
|
||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||
|
||||
local S = minetest.get_translator("nalc_default")
|
||||
nalc_default = {}
|
||||
nalc_default.get_translator = S
|
||||
|
||||
-- Functions
|
||||
dofile(modpath.."/functions.lua")
|
||||
|
||||
|
31
nalc_default/locale/nalc_default.fr.tr
Normal file
31
nalc_default/locale/nalc_default.fr.tr
Normal file
@ -0,0 +1,31 @@
|
||||
# textdomain: nalc_default
|
||||
|
||||
## nodes.lua ##
|
||||
|
||||
Coal Ore=Minerai de charbon
|
||||
Iron Ore=Minerai de fer
|
||||
Copper Ore=Minerai de cuivre
|
||||
Tin Ore=Minerai d'étain
|
||||
Meze Block=Bloc de meze
|
||||
Spiky Cactus=Cactus piquant
|
||||
Acid Source=Source d'acide
|
||||
Flowing Acid=Écoulement d'acide
|
||||
Sand Source=Source de sable
|
||||
Flowing Sand=Écoulement de sable
|
||||
Obsidian Ladder=Échelle en obsidienne
|
||||
|
||||
|
||||
## fences.lua ##
|
||||
|
||||
Cobble Fence=Clôture en pavé
|
||||
Desert Cobble Fence=Clôture en pavé du désert
|
||||
Steel Block Fence=Clôture en blocs d'acier
|
||||
Brick Fence=Clôture en brique
|
||||
|
||||
|
||||
## mapgen.lua ##
|
||||
|
||||
Golden Pickaxe=Pioche en or
|
||||
Golden Shovel=Pelle en or
|
||||
Golden Axe=Hache en or
|
||||
Golden Sword=Épée en or
|
31
nalc_default/locale/template.txt
Normal file
31
nalc_default/locale/template.txt
Normal file
@ -0,0 +1,31 @@
|
||||
# textdomain: nalc_default
|
||||
|
||||
## nodes.lua ##
|
||||
|
||||
Coal Ore=
|
||||
Iron Ore=
|
||||
Copper Ore=
|
||||
Tin Ore=
|
||||
Meze Block=
|
||||
Spiky Cactus=
|
||||
Acid Source=
|
||||
Flowing Acid=
|
||||
Sand Source=
|
||||
Flowing Sand=
|
||||
Obsidian Ladder=
|
||||
|
||||
|
||||
## fences.lua ##
|
||||
|
||||
Cobble Fence=
|
||||
Desert Cobble Fence=
|
||||
Steel Block Fence=
|
||||
Brick Fence=
|
||||
|
||||
|
||||
## mapgen.lua ##
|
||||
|
||||
Golden Pickaxe=
|
||||
Golden Shovel=
|
||||
Golden Axe=
|
||||
Golden Sword=
|
@ -1,3 +1,5 @@
|
||||
local S = nalc_default.get_translator
|
||||
|
||||
local function die_later(digger)
|
||||
digger:set_hp(0)
|
||||
end
|
||||
@ -5,7 +7,7 @@ end
|
||||
minetest.register_node(
|
||||
":nalc:desert_stone_with_coal",
|
||||
{
|
||||
description = "Coal Ore",
|
||||
description = S("Coal Ore"),
|
||||
tiles = {"default_desert_stone.png^default_mineral_coal.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly = 1, cracky = 3},
|
||||
@ -20,7 +22,7 @@ minetest.register_node(
|
||||
minetest.register_node(
|
||||
":nalc:desert_stone_with_iron",
|
||||
{
|
||||
description = "Iron Ore",
|
||||
description = S("Iron Ore"),
|
||||
tiles = {"default_desert_stone.png^default_mineral_iron.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky = 2},
|
||||
@ -35,7 +37,7 @@ minetest.register_node(
|
||||
minetest.register_node(
|
||||
":nalc:desert_stone_with_copper",
|
||||
{
|
||||
description = "Copper Ore",
|
||||
description = S("Copper Ore"),
|
||||
tiles = {"default_desert_stone.png^default_mineral_copper.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky = 2},
|
||||
@ -50,7 +52,7 @@ minetest.register_node(
|
||||
minetest.register_node(
|
||||
":nalc:desert_stone_with_tin",
|
||||
{
|
||||
description = "Tin Ore",
|
||||
description = S("Tin Ore"),
|
||||
tiles = {"default_desert_stone.png^default_mineral_tin.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky = 2},
|
||||
@ -65,7 +67,7 @@ minetest.register_node(
|
||||
minetest.register_node(
|
||||
":nalc:meze",
|
||||
{
|
||||
description = "Meze Block",
|
||||
description = S("Meze Block"),
|
||||
tiles = {"default_meze_block.png"},
|
||||
is_ground_content = true,
|
||||
drop = "",
|
||||
@ -98,7 +100,7 @@ minetest.override_item(
|
||||
minetest.register_node(
|
||||
":nalc:cactus_spiky",
|
||||
{
|
||||
description = "Spiky Cactus",
|
||||
description = S("Spiky Cactus"),
|
||||
tiles = {"default_cactus_top.png", "default_cactus_top.png",
|
||||
"default_cactus_spiky.png"},
|
||||
paramtype2 = "facedir",
|
||||
@ -119,7 +121,7 @@ minetest.register_node(
|
||||
minetest.register_node(
|
||||
":nalc:acid_source",
|
||||
{
|
||||
description = "Acid Source",
|
||||
description = S("Acid Source"),
|
||||
inventory_image = minetest.inventorycube("default_acid.png"),
|
||||
drawtype = "liquid",
|
||||
tiles = {
|
||||
@ -154,7 +156,7 @@ minetest.register_node(
|
||||
minetest.register_node(
|
||||
":nalc:acid_flowing",
|
||||
{
|
||||
description = "Flowing Acid",
|
||||
description = S("Flowing Acid"),
|
||||
inventory_image = minetest.inventorycube("default_acid.png"),
|
||||
drawtype = "flowingliquid",
|
||||
tiles = {"default_acid.png"},
|
||||
@ -192,7 +194,7 @@ minetest.register_node(
|
||||
minetest.register_node(
|
||||
":nalc:sand_source",
|
||||
{
|
||||
description = "Sand Source",
|
||||
description = S("Sand Source"),
|
||||
inventory_image = minetest.inventorycube("default_sand.png"),
|
||||
drawtype = "liquid",
|
||||
tiles = {"default_sand.png"},
|
||||
@ -215,7 +217,7 @@ minetest.register_node(
|
||||
minetest.register_node(
|
||||
":nalc:sand_flowing",
|
||||
{
|
||||
description = "Flowing Sand",
|
||||
description = S("Flowing Sand"),
|
||||
inventory_image = minetest.inventorycube("default_sand.png"),
|
||||
drawtype = "flowingliquid",
|
||||
tiles = {"default_sand.png"},
|
||||
@ -254,7 +256,7 @@ minetest.register_node(
|
||||
minetest.register_node(
|
||||
":nalc:ladder_obsidian",
|
||||
{
|
||||
description = "Obsidian Ladder",
|
||||
description = S("Obsidian Ladder"),
|
||||
drawtype = "signlike",
|
||||
tiles = {"default_ladder_obsidian.png"},
|
||||
inventory_image = "default_ladder_obsidian.png",
|
||||
|
@ -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