translate many nalc_* mods

and use function to register toolranks
This commit is contained in:
2022-07-24 03:59:18 +02:00
parent 120bcf9bd3
commit c5437a4b3d
33 changed files with 321 additions and 121 deletions

View File

@ -13,6 +13,8 @@
*award_gold_master (Gold Master - dig 1000 default:stone_with_gold)--> 1 Super Quarry
]]--
local S = minetest.get_translator("nalc_awards")
if minetest.get_modpath("awards") then
-- Check if a player object is valid for awards.
@ -22,20 +24,20 @@ if minetest.get_modpath("awards") then
-- Redéfinition de la description d'awards existant
local award = awards.registered_awards["award_mine3"]
award.description = award.description.." (Unlock the craft of 1 Quarry)"
award.description = award.description.. S(" (Unlock the craft of 1 Quarry)")
award = awards.registered_awards["award_mine4"]
award.description = award.description.." (Unlock the craft of 1 Super Quarry)"
award.description = award.description.. S(" (Unlock the craft of 1 Super Quarry)")
award = awards.registered_awards["award_youre_a_copper"]
award.description = award.description.." (Unlock the craft of 1 Super Quarry)"
award.description = award.description.. S(" (Unlock the craft of 1 Super Quarry)")
-- Définitions de nouveaux awards --
-- Iron Lady
awards.register_award(
"award_iron_miner", {
title = "The Iron Lady",
description = "Dig 100 iron ores. (Unlock the craft of 2 Quarry)",
title = S("The Iron Lady"),
description = S("Dig 100 iron ores. (Unlock the craft of 2 Quarry)"),
icon = "default_iron_lump.png^awards_level1.png",
background = "awards_bg_mining.png",
difficulty = 0.03,
@ -49,8 +51,8 @@ if minetest.get_modpath("awards") then
-- Iron Man
awards.register_award(
"award_iron_master", {
title = "The Iron Man",
description = "Dig 1,000 iron ores. (Unlock the craft of 1 Super Quarry)",
title = S("The Iron Man"),
description = S("Dig 1,000 iron ores. (Unlock the craft of 1 Super Quarry)"),
icon = "default_iron_lump.png^awards_level2.png",
background = "awards_bg_mining.png",
difficulty = 0.04,
@ -64,8 +66,8 @@ if minetest.get_modpath("awards") then
-- Copper Trooper
awards.register_award(
"award_copper_miner", {
title = "Copper Trooper",
description = "Dig 100 copper ores. (Unlock the craft of 4 Quarry)",
title = S("Copper Trooper"),
description = S("Dig 100 copper ores. (Unlock the craft of 4 Quarry)"),
icon = "default_copper_lump.png^awards_level1.png",
background = "awards_bg_mining.png",
difficulty = 0.19,
@ -79,8 +81,8 @@ if minetest.get_modpath("awards") then
-- Gold Digger
awards.register_award(
"award_gold_miner", {
title = "Gold Digger",
description = "Dig 100 gold ores. (Unlock the craft of 5 Quarry)",
title = S("Gold Digger"),
description = S("Dig 100 gold ores. (Unlock the craft of 5 Quarry)"),
icon = "default_gold_lump.png^awards_level3.png",
background = "awards_bg_mining.png",
difficulty = 0.91,
@ -94,8 +96,8 @@ if minetest.get_modpath("awards") then
-- The Golden Age
awards.register_award(
"award_gold_master", {
title = "The Golden Age",
description = "Dig 1,000 gold ores. (Unlock the craft of 1 Super Quarry)",
title = S("The Golden Age"),
description = S("Dig 1,000 gold ores. (Unlock the craft of 1 Super Quarry)"),
icon = "default_gold_lump.png^awards_level4.png",
background = "awards_bg_mining.png",
difficulty = 0.92,
@ -110,7 +112,7 @@ if minetest.get_modpath("awards") then
minetest.register_node(
":nalc:waste",
{
description = "Waste",
description = S("Waste"),
tiles = {"waste.png"},
is_ground_content = false,
groups = {crumbly=2, flammable=2},
@ -165,7 +167,7 @@ if minetest.get_modpath("awards") then
if levels then
local items_crafted = data.craft[itemname] or 0
if not authorized_craft(items_crafted, levels, data.unlocked) then
minetest.chat_send_player(playern, "Vous n'avez pas assez d'expérience pour fabriquer cet article ! À la place, vous obtenez un bloc de déchets. / You don't have enough experience to make this item! Instead, you get a block of waste.")
minetest.chat_send_player(playern, S("You don't have enough experience to make this item! Instead, you get a block of waste."))
return ItemStack("nalc:waste")
end
end