Merge branch 'crabman77-translation'

This commit is contained in:
bri cassa 2022-08-20 20:41:31 +02:00
commit 0e092543e3
33 changed files with 583 additions and 305 deletions

View File

@ -13,6 +13,8 @@
*award_gold_master (Gold Master - dig 1000 default:stone_with_gold)--> 1 Super Quarry *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 if minetest.get_modpath("awards") then
-- Check if a player object is valid for awards. -- 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 -- Redéfinition de la description d'awards existant
local award = awards.registered_awards["award_mine3"] 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 = 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 = 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 -- -- Définitions de nouveaux awards --
-- Iron Lady -- Iron Lady
awards.register_award( awards.register_award(
"award_iron_miner", { "award_iron_miner", {
title = "The Iron Lady", title = S("The Iron Lady"),
description = "Dig 100 iron ores. (Unlock the craft of 2 Quarry)", description = S("Dig 100 iron ores. (Unlock the craft of 2 Quarry)"),
icon = "default_iron_lump.png^awards_level1.png", icon = "default_iron_lump.png^awards_level1.png",
background = "awards_bg_mining.png", background = "awards_bg_mining.png",
difficulty = 0.03, difficulty = 0.03,
@ -49,8 +51,8 @@ if minetest.get_modpath("awards") then
-- Iron Man -- Iron Man
awards.register_award( awards.register_award(
"award_iron_master", { "award_iron_master", {
title = "The Iron Man", title = S("The Iron Man"),
description = "Dig 1,000 iron ores. (Unlock the craft of 1 Super Quarry)", description = S("Dig 1,000 iron ores. (Unlock the craft of 1 Super Quarry)"),
icon = "default_iron_lump.png^awards_level2.png", icon = "default_iron_lump.png^awards_level2.png",
background = "awards_bg_mining.png", background = "awards_bg_mining.png",
difficulty = 0.04, difficulty = 0.04,
@ -64,8 +66,8 @@ if minetest.get_modpath("awards") then
-- Copper Trooper -- Copper Trooper
awards.register_award( awards.register_award(
"award_copper_miner", { "award_copper_miner", {
title = "Copper Trooper", title = S("Copper Trooper"),
description = "Dig 100 copper ores. (Unlock the craft of 4 Quarry)", description = S("Dig 100 copper ores. (Unlock the craft of 4 Quarry)"),
icon = "default_copper_lump.png^awards_level1.png", icon = "default_copper_lump.png^awards_level1.png",
background = "awards_bg_mining.png", background = "awards_bg_mining.png",
difficulty = 0.19, difficulty = 0.19,
@ -79,8 +81,8 @@ if minetest.get_modpath("awards") then
-- Gold Digger -- Gold Digger
awards.register_award( awards.register_award(
"award_gold_miner", { "award_gold_miner", {
title = "Gold Digger", title = S("Gold Digger"),
description = "Dig 100 gold ores. (Unlock the craft of 5 Quarry)", description = S("Dig 100 gold ores. (Unlock the craft of 5 Quarry)"),
icon = "default_gold_lump.png^awards_level3.png", icon = "default_gold_lump.png^awards_level3.png",
background = "awards_bg_mining.png", background = "awards_bg_mining.png",
difficulty = 0.91, difficulty = 0.91,
@ -94,8 +96,8 @@ if minetest.get_modpath("awards") then
-- The Golden Age -- The Golden Age
awards.register_award( awards.register_award(
"award_gold_master", { "award_gold_master", {
title = "The Golden Age", title = S("The Golden Age"),
description = "Dig 1,000 gold ores. (Unlock the craft of 1 Super Quarry)", description = S("Dig 1,000 gold ores. (Unlock the craft of 1 Super Quarry)"),
icon = "default_gold_lump.png^awards_level4.png", icon = "default_gold_lump.png^awards_level4.png",
background = "awards_bg_mining.png", background = "awards_bg_mining.png",
difficulty = 0.92, difficulty = 0.92,
@ -110,7 +112,7 @@ if minetest.get_modpath("awards") then
minetest.register_node( minetest.register_node(
":nalc:waste", ":nalc:waste",
{ {
description = "Waste", description = S("Waste"),
tiles = {"waste.png"}, tiles = {"waste.png"},
is_ground_content = false, is_ground_content = false,
groups = {crumbly=2, flammable=2}, groups = {crumbly=2, flammable=2},
@ -165,7 +167,7 @@ if minetest.get_modpath("awards") then
if levels then if levels then
local items_crafted = data.craft[itemname] or 0 local items_crafted = data.craft[itemname] or 0
if not authorized_craft(items_crafted, levels, data.unlocked) then 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") return ItemStack("nalc:waste")
end end
end end

View File

@ -0,0 +1,16 @@
# textdomain: nalc_awards
(Unlock the craft of 1 Quarry)= (Débloque la fabrication de 1 Quarry)
(Unlock the craft of 1 Super Quarry)= (Débloque la fabrication de 1 Super Quarry)
The Iron Lady=La Dame de Fer
Dig 100 iron ores. (Unlock the craft of 2 Quarry)=Creusez 100 minerais de fer. (Débloque la fabrication de 2 Quarry)
The Iron Man=L'Homme de Fer
Dig 1,000 iron ores. (Unlock the craft of 1 Super Quarry)=Creusez 1 000 minerais de fer. (Débloque la fabrication de 1 Super Quarry)
Copper Trooper=Soldat de cuivre
Dig 100 copper ores. (Unlock the craft of 4 Quarry)=Creusez 100 minerais de cuivre. (Débloque la fabrication de 4 Quarry)
Gold Digger=Chercheur d'or
Dig 100 gold ores. (Unlock the craft of 5 Quarry)=Creusez 100 minerais d'or. (Débloque la fabrication de 5 Quarry)
The Golden Age=L'âge d'or
Dig 1,000 gold ores. (Unlock the craft of 1 Super Quarry)=Creusez 1 000 minerais d'or. (Débloque la fabrication de 1 Super Quarry)
Waste=Déchets
You don't have enough experience to make this item! Instead, you get a block of waste.=Vous n'avez pas assez d'expérience pour fabriquer cet article ! À la place, vous obtenez un bloc de déchets.

View File

@ -0,0 +1,18 @@
# textdomain: awards
(Unlock the craft of 1 Quarry)=
(Unlock the craft of 1 Super Quarry)=
The Iron Lady=
Dig 100 iron ores. (Unlock the craft of 2 Quarry)=
The Iron Man=
Dig 1,000 iron ores. (Unlock the craft of 1 Super Quarry)=
Copper Trooper=
Dig 100 copper ores. (Unlock the craft of 4 Quarry)=
Gold Digger=
Dig 100 gold ores. (Unlock the craft of 5 Quarry)=
The Golden Age=
Dig 1,000 gold ores. (Unlock the craft of 1 Super Quarry)=
Waste=
You don't have enough experience to make this item! Instead, you get a block of waste.=

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("nalc_beds")
--overidde craft recipe of the default beds --overidde craft recipe of the default beds
minetest.clear_craft({ output = "beds:bed_bottom" }) minetest.clear_craft({ output = "beds:bed_bottom" })
minetest.clear_craft({ output = "beds:fancy_bed_bottom" }) minetest.clear_craft({ output = "beds:fancy_bed_bottom" })
@ -23,7 +25,7 @@ for _, colour in pairs({"white", "black", "blue", "green"}) do
beds.register_bed( beds.register_bed(
"nalc_beds:fancy_bed_" .. colour, "nalc_beds:fancy_bed_" .. colour,
{ {
description = "Fancy Bed (" .. colour .. ")", description = S("Fancy Bed (@1)", S(colour)),
inventory_image = "beds_bed_fancy_" .. colour .. ".png", inventory_image = "beds_bed_fancy_" .. colour .. ".png",
wield_image = "beds_bed_fancy_" .. colour .. ".png", wield_image = "beds_bed_fancy_" .. colour .. ".png",
tiles = { tiles = {
@ -80,7 +82,7 @@ for _, colour in pairs({"white", "black", "blue", "green"}) do
beds.register_bed( beds.register_bed(
"nalc_beds:bed_" .. colour, "nalc_beds:bed_" .. colour,
{ {
description = "Simple Bed (" .. colour .. ")", description = S("Simple Bed (@1)", S(colour)),
inventory_image = "beds_bed_" .. colour .. ".png", inventory_image = "beds_bed_" .. colour .. ".png",
wield_image = "beds_bed_" .. colour .. ".png", wield_image = "beds_bed_" .. colour .. ".png",
tiles = { tiles = {

View File

@ -0,0 +1,8 @@
# textdomain: nalc_beds
Fancy Bed (@1)=Lit chic (@1)
Simple Bed (@1)=Lit simple (@1)
white=blanc
black=noir
blue=bleu
green=vert

View File

@ -0,0 +1,10 @@
# textdomain: nalc_beds
Fancy Bed (@1)=
Simple Bed (@1)=
white=
black=
blue=
green=

View File

@ -1,3 +1,4 @@
local S = minetest.get_translator("nalc_boats")
-- --
-- Helper functions -- Helper functions
-- --
@ -232,7 +233,7 @@ local register_boat = function(parameters)
minetest.register_craftitem( minetest.register_craftitem(
"nalc_boats:"..parameters.name, "nalc_boats:"..parameters.name,
{ {
description = parameters.description or "Boat", description = parameters.description or S("Boat"),
inventory_image = "boats_"..parameters.name .. "_inventory.png", inventory_image = "boats_"..parameters.name .. "_inventory.png",
wield_image = "boats_"..parameters.name.."_wield.png", wield_image = "boats_"..parameters.name.."_wield.png",
wield_scale = {x = 2, y = 2, z = 1}, wield_scale = {x = 2, y = 2, z = 1},
@ -281,7 +282,7 @@ register_boat(
down = 0.18, down = 0.18,
rotate = 1 rotate = 1
}, },
description = "Race boat" description = S("Race boat")
}) })
register_boat( register_boat(
@ -292,7 +293,7 @@ register_boat(
down = 0.25, down = 0.25,
rotate = 4 rotate = 4
}, },
description = "Expert race boat" description = S("Expert race boat")
}) })
register_boat( register_boat(
@ -303,7 +304,7 @@ register_boat(
down = 0.24, down = 0.24,
rotate = 4 rotate = 4
}, },
description = "Water boat" description = S("Water boat")
}) })
register_boat( register_boat(
@ -314,7 +315,7 @@ register_boat(
down = 0.1, down = 0.1,
rotate = 8 rotate = 8
}, },
description = "Moon boat" description = S("Moon boat")
}) })
minetest.register_craft( minetest.register_craft(

View File

@ -0,0 +1,7 @@
# textdomain: nalc_boats
Boat=Bateau
Race boat=Bateau de course
Expert race boat=Bateau de course expert
Water boat=Bateau à eau
Moon boat=Bateau lunaire

View File

@ -0,0 +1,7 @@
# textdomain: nalc_boats
Boat=
Race boat=
Expert race boat=
Water boat=
Moon boat=

View File

@ -1,9 +1,11 @@
local S = minetest.get_translator("nalc_bucket")
bucket.register_liquid( bucket.register_liquid(
"nalc:acid_source", "nalc:acid_source",
"nalc:acid_flowing", "nalc:acid_flowing",
"nalc_bucket:bucket_acid", "nalc_bucket:bucket_acid",
"bucket_acid.png", "bucket_acid.png",
"Acid Bucket", S("Acid Bucket"),
{not_in_creative_inventory = 1} {not_in_creative_inventory = 1}
) )
@ -12,7 +14,7 @@ bucket.register_liquid(
"nalc:sand_flowing", "nalc:sand_flowing",
"nalc_bucket:bucket_sand", "nalc_bucket:bucket_sand",
"bucket_sand.png", "bucket_sand.png",
"Sand Bucket", S("Sand Bucket"),
{not_in_creative_inventory = 1} {not_in_creative_inventory = 1}
) )

View File

@ -0,0 +1,4 @@
# textdomain: nalc_bucket
Acid Bucket=Seau d'acide
Sand Bucket=Seau de sable

View File

@ -0,0 +1,4 @@
# textdomain: nalc_bucket
Acid Bucket=
Sand Bucket=

View File

@ -1,7 +1,9 @@
local S = nalc_default.get_translator
default.register_fence( default.register_fence(
":nalc:fence_cobble", ":nalc:fence_cobble",
{ {
description = "Cobble Fence", description = S("Cobble Fence"),
texture = "default_fence_cobble.png", texture = "default_fence_cobble.png",
material = "default:cobble", material = "default:cobble",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
@ -11,7 +13,7 @@ default.register_fence(
default.register_fence( default.register_fence(
":nalc:fence_desert_cobble", ":nalc:fence_desert_cobble",
{ {
description = "Desert Cobble Fence", description = S("Desert Cobble Fence"),
texture = "default_fence_desert_cobble.png", texture = "default_fence_desert_cobble.png",
material = "default:desert_cobble", material = "default:desert_cobble",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
@ -21,7 +23,7 @@ default.register_fence(
default.register_fence( default.register_fence(
":nalc:fence_steelblock", ":nalc:fence_steelblock",
{ {
description = "Steel Block Fence", description = S("Steel Block Fence"),
texture = "default_fence_steelblock.png", texture = "default_fence_steelblock.png",
material = "default:steelblock", material = "default:steelblock",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
@ -31,7 +33,7 @@ default.register_fence(
default.register_fence( default.register_fence(
":nalc:fence_brick", ":nalc:fence_brick",
{ {
description = "Brick Fence", description = S("Brick Fence"),
texture = "default_fence_brick.png", texture = "default_fence_brick.png",
material = "default:brick", material = "default:brick",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2}, groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},

View File

@ -1,5 +1,9 @@
local modpath = minetest.get_modpath(minetest.get_current_modname()) local modpath = minetest.get_modpath(minetest.get_current_modname())
local S = minetest.get_translator("nalc_default")
nalc_default = {}
nalc_default.get_translator = S
-- Functions -- Functions
dofile(modpath.."/functions.lua") dofile(modpath.."/functions.lua")

View 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

View 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=

View File

@ -1,3 +1,5 @@
local S = nalc_default.get_translator
local function die_later(digger) local function die_later(digger)
digger:set_hp(0) digger:set_hp(0)
end end
@ -5,7 +7,7 @@ end
minetest.register_node( minetest.register_node(
":nalc:desert_stone_with_coal", ":nalc:desert_stone_with_coal",
{ {
description = "Coal Ore", description = S("Coal Ore"),
tiles = {"default_desert_stone.png^default_mineral_coal.png"}, tiles = {"default_desert_stone.png^default_mineral_coal.png"},
is_ground_content = true, is_ground_content = true,
groups = {crumbly = 1, cracky = 3}, groups = {crumbly = 1, cracky = 3},
@ -20,7 +22,7 @@ minetest.register_node(
minetest.register_node( minetest.register_node(
":nalc:desert_stone_with_iron", ":nalc:desert_stone_with_iron",
{ {
description = "Iron Ore", description = S("Iron Ore"),
tiles = {"default_desert_stone.png^default_mineral_iron.png"}, tiles = {"default_desert_stone.png^default_mineral_iron.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky = 2}, groups = {cracky = 2},
@ -35,7 +37,7 @@ minetest.register_node(
minetest.register_node( minetest.register_node(
":nalc:desert_stone_with_copper", ":nalc:desert_stone_with_copper",
{ {
description = "Copper Ore", description = S("Copper Ore"),
tiles = {"default_desert_stone.png^default_mineral_copper.png"}, tiles = {"default_desert_stone.png^default_mineral_copper.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky = 2}, groups = {cracky = 2},
@ -50,7 +52,7 @@ minetest.register_node(
minetest.register_node( minetest.register_node(
":nalc:desert_stone_with_tin", ":nalc:desert_stone_with_tin",
{ {
description = "Tin Ore", description = S("Tin Ore"),
tiles = {"default_desert_stone.png^default_mineral_tin.png"}, tiles = {"default_desert_stone.png^default_mineral_tin.png"},
is_ground_content = true, is_ground_content = true,
groups = {cracky = 2}, groups = {cracky = 2},
@ -65,7 +67,7 @@ minetest.register_node(
minetest.register_node( minetest.register_node(
":nalc:meze", ":nalc:meze",
{ {
description = "Meze Block", description = S("Meze Block"),
tiles = {"default_meze_block.png"}, tiles = {"default_meze_block.png"},
is_ground_content = true, is_ground_content = true,
drop = "", drop = "",
@ -98,7 +100,7 @@ minetest.override_item(
minetest.register_node( minetest.register_node(
":nalc:cactus_spiky", ":nalc:cactus_spiky",
{ {
description = "Spiky Cactus", description = S("Spiky Cactus"),
tiles = {"default_cactus_top.png", "default_cactus_top.png", tiles = {"default_cactus_top.png", "default_cactus_top.png",
"default_cactus_spiky.png"}, "default_cactus_spiky.png"},
paramtype2 = "facedir", paramtype2 = "facedir",
@ -119,7 +121,7 @@ minetest.register_node(
minetest.register_node( minetest.register_node(
":nalc:acid_source", ":nalc:acid_source",
{ {
description = "Acid Source", description = S("Acid Source"),
inventory_image = minetest.inventorycube("default_acid.png"), inventory_image = minetest.inventorycube("default_acid.png"),
drawtype = "liquid", drawtype = "liquid",
tiles = { tiles = {
@ -154,7 +156,7 @@ minetest.register_node(
minetest.register_node( minetest.register_node(
":nalc:acid_flowing", ":nalc:acid_flowing",
{ {
description = "Flowing Acid", description = S("Flowing Acid"),
inventory_image = minetest.inventorycube("default_acid.png"), inventory_image = minetest.inventorycube("default_acid.png"),
drawtype = "flowingliquid", drawtype = "flowingliquid",
tiles = {"default_acid.png"}, tiles = {"default_acid.png"},
@ -192,7 +194,7 @@ minetest.register_node(
minetest.register_node( minetest.register_node(
":nalc:sand_source", ":nalc:sand_source",
{ {
description = "Sand Source", description = S("Sand Source"),
inventory_image = minetest.inventorycube("default_sand.png"), inventory_image = minetest.inventorycube("default_sand.png"),
drawtype = "liquid", drawtype = "liquid",
tiles = {"default_sand.png"}, tiles = {"default_sand.png"},
@ -215,7 +217,7 @@ minetest.register_node(
minetest.register_node( minetest.register_node(
":nalc:sand_flowing", ":nalc:sand_flowing",
{ {
description = "Flowing Sand", description = S("Flowing Sand"),
inventory_image = minetest.inventorycube("default_sand.png"), inventory_image = minetest.inventorycube("default_sand.png"),
drawtype = "flowingliquid", drawtype = "flowingliquid",
tiles = {"default_sand.png"}, tiles = {"default_sand.png"},
@ -254,7 +256,7 @@ minetest.register_node(
minetest.register_node( minetest.register_node(
":nalc:ladder_obsidian", ":nalc:ladder_obsidian",
{ {
description = "Obsidian Ladder", description = S("Obsidian Ladder"),
drawtype = "signlike", drawtype = "signlike",
tiles = {"default_ladder_obsidian.png"}, tiles = {"default_ladder_obsidian.png"},
inventory_image = "default_ladder_obsidian.png", inventory_image = "default_ladder_obsidian.png",

View File

@ -1,3 +1,5 @@
local S = nalc_default.get_translator
minetest.register_craft( minetest.register_craft(
{ output = 'nalc:pick_gold', { output = 'nalc:pick_gold',
recipe = { recipe = {
@ -44,7 +46,7 @@ minetest.register_craft(
minetest.register_tool( minetest.register_tool(
":nalc:pick_gold", ":nalc:pick_gold",
{ {
description = "Golden Pickaxe", description = S("Golden Pickaxe"),
inventory_image = "default_tool_goldpick.png", inventory_image = "default_tool_goldpick.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.2, full_punch_interval = 1.2,
@ -60,7 +62,7 @@ minetest.register_tool(
minetest.register_tool( minetest.register_tool(
":nalc:shovel_gold", ":nalc:shovel_gold",
{ {
description = "Golden Shovel", description = S("Golden Shovel"),
inventory_image = "default_tool_goldshovel.png", inventory_image = "default_tool_goldshovel.png",
wield_image = "default_tool_goldshovel.png^[transformR90", wield_image = "default_tool_goldshovel.png^[transformR90",
tool_capabilities = { tool_capabilities = {
@ -76,7 +78,7 @@ minetest.register_tool(
minetest.register_tool( minetest.register_tool(
":nalc:axe_gold", ":nalc:axe_gold",
{ {
description = "Golden Axe", description = S("Golden Axe"),
inventory_image = "default_tool_goldaxe.png", inventory_image = "default_tool_goldaxe.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.2, full_punch_interval = 1.2,
@ -92,7 +94,7 @@ minetest.register_tool(
minetest.register_tool( minetest.register_tool(
":nalc:sword_gold", ":nalc:sword_gold",
{ {
description = "Golden Sword", description = S("Golden Sword"),
inventory_image = "default_tool_goldsword.png", inventory_image = "default_tool_goldsword.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1, full_punch_interval = 1,
@ -106,28 +108,10 @@ minetest.register_tool(
-- Toolranks -- Toolranks
if minetest.get_modpath("toolranks") then if minetest.get_modpath("toolranks") then
toolranks.add_tool("nalc:pick_gold")
minetest.override_item( toolranks.add_tool("nalc:shovel_gold")
"nalc:pick_gold", toolranks.add_tool("nalc:axe_gold")
{ toolranks.add_tool("nalc:sword_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
})
end end
-- Aliases -- Aliases

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("nalc_doors")
-- Register MFF doors -- Register MFF doors
-- doors tin MFF -- doors tin MFF
@ -5,9 +7,9 @@ doors.register(
"door_tin", "door_tin",
{ {
tiles = { "doors_door_tin.png" }, tiles = { "doors_door_tin.png" },
description = "Tin Door", description = S("Tin Door"),
inventory_image = "doors_item_tin.png", inventory_image = "doors_item_tin.png",
groups = {snappy=1,bendy=2,cracky=1,melty=2,level=2,door=1}, groups = {node=1,snappy=1,bendy=2,cracky=1,melty=2,level=2,door=1},
protected = true, protected = true,
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
sunlight = false, sunlight = false,
@ -24,11 +26,13 @@ if minetest.get_modpath("darkage") then
"door_prison", "door_prison",
{ {
tiles = { "doors_door_prison.png" }, tiles = { "doors_door_prison.png" },
description = "Prison Door", description = S("Prison Door"),
inventory_image = "doors_item_prison.png", inventory_image = "doors_item_prison.png",
groups = {snappy=1,bendy=2,cracky=1,melty=2,level=2,door=1}, groups = {node=1,snappy=1,bendy=2,cracky=1,melty=2,level=2,door=1},
protected = true, protected = true,
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
sound_open = "doors_steel_door_open",
sound_close = "doors_steel_door_close",
recipe = { recipe = {
{"darkage:iron_stick", "darkage:iron_stick"}, {"darkage:iron_stick", "darkage:iron_stick"},
{"darkage:iron_stick", "darkage:iron_stick"}, {"darkage:iron_stick", "darkage:iron_stick"},
@ -43,9 +47,9 @@ if minetest.get_modpath("dye") then
"doors:door_gardengate_white", "doors:door_gardengate_white",
{ {
tiles = { "doors_door_gardengate_white.png" }, tiles = { "doors_door_gardengate_white.png" },
description = "Garden Gate White Door", description = S("Garden Gate White Door"),
inventory_image = "doors_item_gardengate_white.png", inventory_image = "doors_item_gardengate_white.png",
groups = {choppy=2,oddly_breakable_by_hand=2,flammable=2,door=1}, groups = {node=1,choppy=2,oddly_breakable_by_hand=2,flammable=2,door=1},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
recipe = { recipe = {
{"dye:white", "group:stick", ""}, {"dye:white", "group:stick", ""},
@ -211,12 +215,18 @@ function _doors.door_toggle(pos, node, clicker)
end end
local dir = node.param2 local dir = node.param2
minetest.swap_node(
pos, -- It's possible param2 is messed up, so, validate before using
{ -- the input data. This indicates something may have rotated
name = name .. transform[state + 1][dir+1].v, -- the door, even though that is not supported.
param2 = transform[state + 1][dir+1].param2 if not transform[state + 1] or not transform[state + 1][dir + 1] then
}) return false
end
minetest.swap_node(pos, {
name = name .. transform[state + 1][dir+1].v,
param2 = transform[state + 1][dir+1].param2
})
meta:set_int("state", state) meta:set_int("state", state)
--MFF double porte --MFF double porte
@ -237,14 +247,20 @@ function _doors.door_toggle(pos, node, clicker)
-- /double porte -- /double porte
if state % 2 == 0 then if state % 2 == 0 then
minetest.sound_play(def.door.sounds[1], {pos = pos, gain = 0.3, max_hear_distance = 10}) minetest.sound_play(def.door.sounds[1],
{pos = pos, gain = def.door.gains[1], max_hear_distance = 10}, true)
else else
minetest.sound_play(def.door.sounds[2], {pos = pos, gain = 0.3, max_hear_distance = 10}) minetest.sound_play(def.door.sounds[2],
{pos = pos, gain = def.door.gains[2], max_hear_distance = 10}, true)
end end
return true return true
end end
local old_doors_toggle = doors.door_toggle -- unused now
doors.door_toggle = _doors.door_toggle
local function on_place_node(place_to, newnode, placer, oldnode, itemstack, pointed_thing) local function on_place_node(place_to, newnode, placer, oldnode, itemstack, pointed_thing)
-- Run script hook -- Run script hook
for _, callback in ipairs(minetest.registered_on_placenodes) do for _, callback in ipairs(minetest.registered_on_placenodes) do
@ -274,6 +290,70 @@ local function can_dig_door(pos, digger)
end end
end end
local function on_skeleton_key_use(pos, player, newsecret)
replace_old_owner_information(pos)
local meta = minetest.get_meta(pos)
local owner = meta:get_string("owner")
local pname = player:get_player_name()
-- verify placer is owner of lockable door
if owner ~= pname then
minetest.record_protection_violation(pos, pname)
minetest.chat_send_player(pname, S("You do not own this locked door."))
return nil
end
local secret = meta:get_string("key_lock_secret")
if secret == "" then
secret = newsecret
meta:set_string("key_lock_secret", secret)
--MFF double porte
local node = minetest.get_node(pos)
local def = minetest.registered_nodes[node.name]
local b = string.sub(node.name, -1)
local dir = node.param2
local state = meta:get_string("state")
if state == "" then
if node.name:sub(-2) == "_b" then
state = 2
else
state = 0
end
else
state = tonumber(state)
end
local pos2 = get_double_doors(pos, dir, state, b)
if pos2 then
local node2 = minetest.get_node_or_nil(pos2)
if node2 and string.sub(node2.name, 0, -3) == string.sub(node.name, 0, -3) then
if b ~= string.sub(node2.name, -1) then
local state2 = minetest.get_meta(pos2):get_int("state")
if (state % 2) == (state2 % 2) then
local meta2 = minetest.get_meta(pos2)
meta2:set_string("key_lock_secret", secret)
end
end
end
end
-- /double porte
end
return secret, S("a locked door"), owner
end
-- / rewrite function of default protected doors, keys open double doors
minetest.register_on_mods_loaded(function()
for n in pairs(doors.registered_doors) do
local def = minetest.registered_nodes[n]
if def and def.on_skeleton_key_use then
def.on_skeleton_key_use = on_skeleton_key_use
end
end
end)
-- door 3 nodes -- door 3 nodes
function doors.register3(name, def) function doors.register3(name, def)
if not name:find(":") then if not name:find(":") then
@ -281,155 +361,150 @@ function doors.register3(name, def)
end end
-- replace old doors of this type automatically -- replace old doors of this type automatically
minetest.register_lbm( minetest.register_lbm({
{ name = ":doors:replace_" .. name:gsub(":", "_"),
name = ":doors:replace_" .. name:gsub(":", "_"), nodenames = {name.."_b_1", name.."_b_2"},
nodenames = {name.."_b_1", name.."_b_2"}, action = function(pos, node)
action = function(pos, node) local l = tonumber(node.name:sub(-1))
local l = tonumber(node.name:sub(-1)) local meta = minetest.get_meta(pos)
local meta = minetest.get_meta(pos) local h = meta:get_int("right") + 1
local h = meta:get_int("right") + 1 local p2 = node.param2
local p2 = node.param2 local replace = {
local replace = { {{type = "a", state = 0}, {type = "a", state = 3}},
{{type = "a", state = 0}, {type = "a", state = 3}}, {{type = "b", state = 1}, {type = "b", state = 2}}
{{type = "b", state = 1}, {type = "b", state = 2}} }
} local new = replace[l][h]
local new = replace[l][h] -- retain infotext and doors_owner fields
-- retain infotext and doors_owner fields minetest.swap_node(pos, {name = name .. "_" .. new.type, param2 = p2})
minetest.swap_node(pos, {name = name .. "_" .. new.type, param2 = p2}) meta:set_int("state", new.state)
meta:set_int("state", new.state) -- properly place doors:hidden at the right spot
-- properly place doors:hidden at the right spot local p3 = p2
local p3 = p2 if new.state >= 2 then
p3 = (p3 + 3) % 4
end
if new.state % 2 == 1 then
if new.state >= 2 then if new.state >= 2 then
p3 = (p3 + 1) % 4
else
p3 = (p3 + 3) % 4 p3 = (p3 + 3) % 4
end end
if new.state % 2 == 1 then
if new.state >= 2 then
p3 = (p3 + 1) % 4
else
p3 = (p3 + 3) % 4
end
end
-- wipe meta on top node as it's unused
minetest.set_node(
{x = pos.x, y = pos.y + 1, z = pos.z},
{name = "doors:hidden", param2 = p3}
)
minetest.set_node(
{x = pos.x, y = pos.y + 2, z = pos.z},
{name = "doors:hidden", param2 = p3}
)
end end
}) -- wipe meta on top node as it's unused
minetest.set_node({x = pos.x, y = pos.y + 1, z = pos.z},
{name = "doors:hidden", param2 = p3})
minetest.set_node({x = pos.x, y = pos.y + 2, z = pos.z},
{name = "doors:hidden", param2 = p3})
end
})
minetest.register_craftitem( minetest.register_craftitem(":" .. name, {
":" .. name, description = def.description,
{ inventory_image = def.inventory_image,
description = def.description, groups = table.copy(def.groups),
inventory_image = def.inventory_image,
groups = table.copy(def.groups),
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
local pos local pos
if not pointed_thing.type == "node" then
return itemstack
end
local node = minetest.get_node(pointed_thing.under)
local pdef = minetest.registered_nodes[node.name]
if pdef and pdef.on_rightclick and
not placer:get_player_control().sneak then
return pdef.on_rightclick(pointed_thing.under,
node, placer, itemstack, pointed_thing)
end
if pdef and pdef.buildable_to then
pos = pointed_thing.under
else
pos = pointed_thing.above
node = minetest.get_node(pos)
pdef = minetest.registered_nodes[node.name]
if not pdef or not pdef.buildable_to then
return itemstack
end
end
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
local top_node = minetest.get_node_or_nil(above)
local topdef = top_node and minetest.registered_nodes[top_node.name]
if not topdef or not topdef.buildable_to then
return itemstack
end
local above2 = { x = pos.x, y = pos.y + 2, z = pos.z }
local top_node2 = minetest.get_node_or_nil(above2)
local topdef2 = top_node2 and minetest.registered_nodes[top_node2.name]
if not topdef2 or not topdef2.buildable_to then
return itemstack
end
local pn = placer:get_player_name()
if minetest.is_protected(pos, pn) or minetest.is_protected(above, pn) or minetest.is_protected(above2, pn) then
return itemstack
end
local dir = minetest.dir_to_facedir(placer:get_look_dir())
local ref = {
{x = -1, y = 0, z = 0},
{x = 0, y = 0, z = 1},
{x = 1, y = 0, z = 0},
{x = 0, y = 0, z = -1},
}
local aside = {
x = pos.x + ref[dir + 1].x,
y = pos.y + ref[dir + 1].y,
z = pos.z + ref[dir + 1].z,
}
local state = 0
if minetest.get_item_group(minetest.get_node(aside).name, "door") == 1 then
state = state + 2
minetest.set_node(pos, {name = name .. "_b", param2 = dir})
minetest.set_node(above, {name = "doors:hidden", param2 = (dir + 3) % 4})
minetest.set_node(above2, {name = "doors:hidden", param2 = (dir + 3) % 4})
else
minetest.set_node(pos, {name = name .. "_a", param2 = dir})
minetest.set_node(above, {name = "doors:hidden", param2 = dir})
minetest.set_node(above2, {name = "doors:hidden", param2 = dir})
end
local meta = minetest.get_meta(pos)
meta:set_int("state", state)
if def.protected then
meta:set_string("owner", pn)
meta:set_string("infotext", "Owned by " .. pn)
end
if not (creative and creative.is_enabled_for and creative.is_enabled_for(pn)) then
itemstack:take_item()
end
minetest.sound_play(def.sounds.place, {pos = pos})
on_place_node(pos, minetest.get_node(pos), placer, node, itemstack, pointed_thing)
if pointed_thing.type ~= "node" then
return itemstack return itemstack
end end
})
local doorname = itemstack:get_name()
local node = minetest.get_node(pointed_thing.under)
local pdef = minetest.registered_nodes[node.name]
if pdef and pdef.on_rightclick and
not (placer and placer:is_player() and
placer:get_player_control().sneak) then
return pdef.on_rightclick(pointed_thing.under,
node, placer, itemstack, pointed_thing)
end
if pdef and pdef.buildable_to then
pos = pointed_thing.under
else
pos = pointed_thing.above
node = minetest.get_node(pos)
pdef = minetest.registered_nodes[node.name]
if not pdef or not pdef.buildable_to then
return itemstack
end
end
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
local top_node = minetest.get_node_or_nil(above)
local topdef = top_node and minetest.registered_nodes[top_node.name]
if not topdef or not topdef.buildable_to then
return itemstack
end
local above2 = { x = pos.x, y = pos.y + 2, z = pos.z }
local top_node2 = minetest.get_node_or_nil(above2)
local topdef2 = top_node2 and minetest.registered_nodes[top_node2.name]
if not topdef2 or not topdef2.buildable_to then
return itemstack
end
local pn = placer and placer:get_player_name() or ""
if minetest.is_protected(pos, pn) or minetest.is_protected(above, pn) or minetest.is_protected(above2, pn) then
return itemstack
end
local dir = placer and minetest.dir_to_facedir(placer:get_look_dir()) or 0
local ref = {
{x = -1, y = 0, z = 0},
{x = 0, y = 0, z = 1},
{x = 1, y = 0, z = 0},
{x = 0, y = 0, z = -1},
}
local aside = {
x = pos.x + ref[dir + 1].x,
y = pos.y + ref[dir + 1].y,
z = pos.z + ref[dir + 1].z,
}
local state = 0
if minetest.get_item_group(minetest.get_node(aside).name, "door") == 1 then
state = state + 2
minetest.set_node(pos, {name = doorname .. "_b", param2 = dir})
minetest.set_node(above, {name = "doors:hidden", param2 = (dir + 3) % 4})
minetest.set_node(above2, {name = "doors:hidden", param2 = (dir + 3) % 4})
else
minetest.set_node(pos, {name = name .. "_a", param2 = dir})
minetest.set_node(above, {name = "doors:hidden", param2 = dir})
minetest.set_node(above2, {name = "doors:hidden", param2 = dir})
end
local meta = minetest.get_meta(pos)
meta:set_int("state", state)
if def.protected then
meta:set_string("owner", pn)
meta:set_string("infotext", def.description .. "\n" .. S("Owned by @1", pn))
end
if not (creative and creative.is_enabled_for and creative.is_enabled_for(pn)) then
itemstack:take_item()
end
minetest.sound_play(def.sounds.place, {pos = pos}, true)
on_place_node(pos, minetest.get_node(pos),
placer, node, itemstack, pointed_thing)
return itemstack
end
})
def.inventory_image = nil def.inventory_image = nil
if def.recipe then if def.recipe then
minetest.register_craft( minetest.register_craft({
{ output = name,
output = name, recipe = def.recipe,
recipe = def.recipe, })
})
end end
def.recipe = nil def.recipe = nil
@ -445,24 +520,36 @@ function doors.register3(name, def)
def.sound_close = "doors_door_close" def.sound_close = "doors_door_close"
end end
if not def.gain_open then
def.gain_open = 0.3
end
if not def.gain_close then
def.gain_close = 0.3
end
def.groups.not_in_creative_inventory = 1 def.groups.not_in_creative_inventory = 1
def.groups.door = 1 def.groups.door = 1
def.drop = name def.drop = name
def.door = { def.door = {
name = name, name = name,
sounds = { def.sound_close, def.sound_open }, sounds = {def.sound_close, def.sound_open},
gains = {def.gain_close, def.gain_open},
} }
if not def.on_rightclick then
def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
_doors.door_toggle(pos, node, clicker) _doors.door_toggle(pos, node, clicker)
return itemstack return itemstack
end
end end
def.after_dig_node = function(pos, node, meta, digger) def.after_dig_node = function(pos, node, meta, digger)
minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z}) minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z})
minetest.remove_node({x = pos.x, y = pos.y + 2, z = pos.z}) minetest.remove_node({x = pos.x, y = pos.y + 2, z = pos.z})
minetest.check_for_falling({x = pos.x, y = pos.y + 2, z = pos.z}) minetest.check_for_falling({x = pos.x, y = pos.y + 2, z = pos.z})
end end
def.on_rotate = false def.on_rotate = function(pos, node, user, mode, new_param2)
return false
end
if def.protected then if def.protected then
def.can_dig = can_dig_door def.can_dig = can_dig_door
@ -471,27 +558,9 @@ function doors.register3(name, def)
local door = doors.get(pos) local door = doors.get(pos)
door:toggle(player) door:toggle(player)
end end
def.on_skeleton_key_use = function(pos, player, newsecret) def.on_skeleton_key_use = on_skeleton_key_use
replace_old_owner_information(pos)
local meta = minetest.get_meta(pos)
local owner = meta:get_string("owner")
local pname = player:get_player_name()
-- verify placer is owner of lockable door def.node_dig_prediction = ""
if owner ~= pname then
minetest.record_protection_violation(pos, pname)
minetest.chat_send_player(pname, "You do not own this locked door.")
return nil
end
local secret = meta:get_string("key_lock_secret")
if secret == "" then
secret = newsecret
meta:set_string("key_lock_secret", secret)
end
return secret, "a locked door", owner
end
else else
def.on_blast = function(pos, intensity) def.on_blast = function(pos, intensity)
minetest.remove_node(pos) minetest.remove_node(pos)
@ -516,24 +585,35 @@ function doors.register3(name, def)
def.buildable_to = false def.buildable_to = false
def.selection_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,2.5,-6/16}} def.selection_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,2.5,-6/16}}
def.collision_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,2.5,-6/16}} def.collision_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,2.5,-6/16}}
def.use_texture_alpha = def.use_texture_alpha or "clip"
def.mesh = "door3_a.obj" def.mesh = "door3_a.obj"
minetest.register_node(":" .. name .. "_a", def) minetest.register_node(":" .. name .. "_a", table.copy(def))
def.mesh = "door3_b.obj" def.mesh = "door3_b.obj"
minetest.register_node(":" .. name .. "_b", def) minetest.register_node(":" .. name .. "_b", table.copy(def))
def.mesh = "door3_b.obj"
minetest.register_node(":" .. name .. "_c", table.copy(def))
def.mesh = "door3_a.obj"
minetest.register_node(":" .. name .. "_d", table.copy(def))
_doors.registered_doors3[name .. "_a"] = true _doors.registered_doors3[name .. "_a"] = true
_doors.registered_doors3[name .. "_b"] = true _doors.registered_doors3[name .. "_b"] = true
_doors.registered_doors3[name .. "_c"] = true
_doors.registered_doors3[name .. "_d"] = true
end end
doors.register3( doors.register3(
"door3_wood", "door3_wood",
{ {
tiles = {{ name = "doors_door3_wood.png", backface_culling = true }}, tiles = {{ name = "doors_door3_wood.png", backface_culling = true }},
description = "Wooden Door 3 Nodes", description = S("Wooden Door 3 Nodes"),
inventory_image = "doors3_item_wood.png", inventory_image = "doors3_item_wood.png",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 }, groups = {node = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 2 },
gain_open = 0.06,
gain_close = 0.13,
recipe = { recipe = {
{"", "", ""}, {"", "", ""},
{"", "doors:door_wood", ""}, {"", "doors:door_wood", ""},
@ -551,10 +631,10 @@ doors.register3(
"door3_steel", "door3_steel",
{ {
tiles = {{ name = "doors_door3_steel.png", backface_culling = true }}, tiles = {{ name = "doors_door3_steel.png", backface_culling = true }},
description = "Steel Door 3 Nodes", description = S("Steel Door 3 Nodes"),
inventory_image = "doors3_item_steel.png", inventory_image = "doors3_item_steel.png",
protected = true, protected = true,
groups = {cracky = 1, level = 2}, groups = {node = 1, cracky = 1, level = 2},
sounds = default.node_sound_metal_defaults(), sounds = default.node_sound_metal_defaults(),
sound_open = "doors_steel_door_open", sound_open = "doors_steel_door_open",
sound_close = "doors_steel_door_close", sound_close = "doors_steel_door_close",
@ -575,9 +655,9 @@ doors.register3(
"door3_glass", "door3_glass",
{ {
tiles = { "doors_door3_glass.png"}, tiles = { "doors_door3_glass.png"},
description = "Glass Door 3 Nodes", description = S("Glass Door 3 Nodes"),
inventory_image = "doors3_item_glass.png", inventory_image = "doors3_item_glass.png",
groups = {cracky=3, oddly_breakable_by_hand=3}, groups = {node=1, cracky=3, oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
sound_open = "doors_glass_door_open", sound_open = "doors_glass_door_open",
sound_close = "doors_glass_door_close", sound_close = "doors_glass_door_close",
@ -598,9 +678,9 @@ doors.register3(
"door3_obsidian_glass", "door3_obsidian_glass",
{ {
tiles = { "doors_door3_obsidian_glass.png" }, tiles = { "doors_door3_obsidian_glass.png" },
description = "Obsidian Glass Door 3 Nodes", description = S("Obsidian Glass Door 3 Nodes"),
inventory_image = "doors3_item_obsidian_glass.png", inventory_image = "doors3_item_obsidian_glass.png",
groups = {cracky=3}, groups = {node=1,cracky=3},
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
sound_open = "doors_glass_door_open", sound_open = "doors_glass_door_open",
sound_close = "doors_glass_door_close", sound_close = "doors_glass_door_close",
@ -623,9 +703,9 @@ if minetest.get_modpath("cherry_tree") then
"door3_cherry", "door3_cherry",
{ {
tiles = { "doors_door3_cherry.png" }, tiles = { "doors_door3_cherry.png" },
description = "Cherry Door 3 Nodes", description = S("Cherry Door 3 Nodes"),
inventory_image = "doors3_item_cherry.png", inventory_image = "doors3_item_cherry.png",
groups = {choppy=2, oddly_breakable_by_hand=2, flammable=2, door=1}, groups = {node=1, choppy=2, oddly_breakable_by_hand=2, flammable=2, door=1},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
recipe = { recipe = {
{"", "", ""}, {"", "", ""},
@ -655,10 +735,10 @@ if minetest.get_modpath("darkage") then
"door3_prison", "door3_prison",
{ {
tiles = { "doors_door3_prison.png" }, tiles = { "doors_door3_prison.png" },
description = "Prison Door 3 Nodes", description = S("Prison Door 3 Nodes"),
inventory_image = "doors3_item_prison.png", inventory_image = "doors3_item_prison.png",
protected = true, protected = true,
groups = {cracky = 1, level = 2}, groups = {node = 1, cracky = 1, level = 2},
sounds = default.node_sound_metal_defaults(), sounds = default.node_sound_metal_defaults(),
sound_open = "doors_steel_door_open", sound_open = "doors_steel_door_open",
sound_close = "doors_steel_door_close", sound_close = "doors_steel_door_close",

View File

@ -0,0 +1,15 @@
# textdomain: nalc_doors
Tin Door=Porte en étain
Prison Door=Porte de prison
Garden Gate White Door=Porte de jardin blanche
Owned by @1=Possédé par @1
You do not own this locked door.=Vous n'êtes pas propriétaire de cette porte verrouillée.
a locked door=une porte verrouillée
Wooden Door 3 Nodes=Porte en bois 3 nodes
Steel Door 3 Nodes=Porte en acier 3 nodes
Glass Door 3 Nodes=Porte vitrée 3 nodes
Obsidian Glass Door 3 Nodes=Porte vitrée en obsidienne 3 nodes
Cherry Door 3 Nodes=Porte en cerisier 3 nodes
Prison Door 3 Nodes=Porte de prison 3 nodes

View File

@ -0,0 +1,15 @@
# textdomain: nalc_doors
Tin Door=
Prison Door=
Garden Gate White Door=
Owned by @1=
You do not own this locked door.=
a locked door=
Wooden Door 3 Nodes=
Steel Door 3 Nodes=
Glass Door 3 Nodes=
Obsidian Glass Door 3 Nodes=
Cherry Door 3 Nodes=
Prison Door 3 Nodes=

View File

@ -1,5 +1,7 @@
local S = minetest.get_translator("nalc_flowers")
local lilypad_def = table.copy(minetest.registered_nodes["flowers:waterlily"]) local lilypad_def = table.copy(minetest.registered_nodes["flowers:waterlily"])
lilypad_def.description = "Lily Pad" lilypad_def.description = S("Lily Pad")
lilypad_def.tiles = {"flowers_lily_pad.png"} lilypad_def.tiles = {"flowers_lily_pad.png"}
lilypad_def.inventory_image = "flowers_lily_pad.png" lilypad_def.inventory_image = "flowers_lily_pad.png"
lilypad_def.wield_image = "flowers_lily_pad.png" lilypad_def.wield_image = "flowers_lily_pad.png"
@ -25,7 +27,7 @@ lilypad_def.on_place = function(itemstack, placer, pointed_thing)
itemstack:take_item() itemstack:take_item()
end end
else else
minetest.chat_send_player(player_name, "Node is protected") minetest.chat_send_player(player_name, S("Node is protected"))
minetest.record_protection_violation(pos, player_name) minetest.record_protection_violation(pos, player_name)
end end
end end

View File

@ -0,0 +1,4 @@
# textdomain: nalc_flowers
Lily Pad=Nénuphar
Node is protected=Node protégé

View File

@ -0,0 +1,4 @@
# textdomain: nalc_flowers
Lily Pad=
Node is protected=

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("nalc_mediterranean")
-- Load tree's schematics -- Load tree's schematics
--local schems_pin_parasol = assert(loadfile(minetest.get_modpath("nalc_mediterranean").."/schematics/pin_parasol.lua"))() --local schems_pin_parasol = assert(loadfile(minetest.get_modpath("nalc_mediterranean").."/schematics/pin_parasol.lua"))()
-- --
@ -10,7 +12,7 @@
-- Mediterranean Dirt definition -- Mediterranean Dirt definition
local dirt_data = table.copy(minetest.registered_nodes["default:dirt_with_dry_grass"]) local dirt_data = table.copy(minetest.registered_nodes["default:dirt_with_dry_grass"])
dirt_data.description = "Dirt with Mediterranean Grass" dirt_data.description = S("Dirt with Mediterranean Grass")
dirt_data.tiles = dirt_data.tiles =
{"default_dry_grass.png^[multiply:#8ACA00", "default_dirt.png", {"default_dry_grass.png^[multiply:#8ACA00", "default_dirt.png",
{name = "default_dirt.png^(default_dry_grass_side.png^[multiply:#8ACA00)", {name = "default_dirt.png^(default_dry_grass_side.png^[multiply:#8ACA00)",
@ -22,7 +24,7 @@ minetest.register_node("nalc_mediterranean:dirt_with_mediterranean_grass", dirt_
-- Mediterranean pine needles -- Mediterranean pine needles
-- Pine Needles -- Pine Needles
local needles_data = table.copy(minetest.registered_nodes["default:pine_needles"]) local needles_data = table.copy(minetest.registered_nodes["default:pine_needles"])
needles_data.description = "Mediterranean Pine Needles" needles_data.description = S("Mediterranean Pine Needles")
needles_data.drop = { needles_data.drop = {
max_items = 1, max_items = 1,
items = { items = {
@ -48,14 +50,14 @@ minetest.register_node("nalc_mediterranean:needles", needles_data)
-- Olive tree definition -- Olive tree definition
local tree_data = table.copy(minetest.registered_nodes["default:tree"]) local tree_data = table.copy(minetest.registered_nodes["default:tree"])
tree_data.description = "Olive tree trunk" tree_data.description = S("Olive tree trunk")
tree_data.tiles = {"default_tree_top.png", "default_tree_top.png", "default_pine_tree.png^[colorize:#8F8F8F6F"} tree_data.tiles = {"default_tree_top.png", "default_tree_top.png", "default_pine_tree.png^[colorize:#8F8F8F6F"}
minetest.register_node("nalc_mediterranean:olive_tree", tree_data) minetest.register_node("nalc_mediterranean:olive_tree", tree_data)
-- Mediterranean Olive leaves -- Mediterranean Olive leaves
local leaves_data = table.copy(minetest.registered_nodes["default:leaves"]) local leaves_data = table.copy(minetest.registered_nodes["default:leaves"])
leaves_data.description = "Olive Leaves" leaves_data.description = S("Olive Leaves")
leaves_data.tiles = {"feuilles_olivier.png"} leaves_data.tiles = {"feuilles_olivier.png"}
leaves_data.special_tiles = {"feuilles_olivier.png"} leaves_data.special_tiles = {"feuilles_olivier.png"}
leaves_data.drop = { leaves_data.drop = {
@ -128,25 +130,25 @@ minetest.register_lbm({
local sapling_data = table.copy(minetest.registered_nodes["default:pine_sapling"]) local sapling_data = table.copy(minetest.registered_nodes["default:pine_sapling"])
local trees = { local trees = {
{ description = "Umbrella Pine Sapling", { description = S("Umbrella Pine Sapling"),
sapling = "nalc_mediterranean:sapling_umbrella_pine", sapling = "nalc_mediterranean:sapling_umbrella_pine",
minp = {x = -10, y = 1, z = -10}, minp = {x = -10, y = 1, z = -10},
maxp = {x = 10, y = 16, z = 10}, maxp = {x = 10, y = 16, z = 10},
texture = "default_pine_sapling.png", texture = "default_pine_sapling.png",
}, },
{ description = "Maritime Pine Sapling", { description = S("Maritime Pine Sapling"),
sapling = "nalc_mediterranean:sapling_maritime_pine", sapling = "nalc_mediterranean:sapling_maritime_pine",
minp = {x = -3, y = 1, z = -3}, minp = {x = -3, y = 1, z = -3},
maxp = {x = 3, y = 14, z = 3}, maxp = {x = 3, y = 14, z = 3},
texture = "default_pine_sapling.png", texture = "default_pine_sapling.png",
}, },
{ description = "Cypress Sapling", { description = S("Cypress Sapling"),
sapling = "nalc_mediterranean:sapling_cypress", sapling = "nalc_mediterranean:sapling_cypress",
minp = {x = -3, y = 1, z = -3}, minp = {x = -3, y = 1, z = -3},
maxp = {x = 3, y = 19, z = 3}, maxp = {x = 3, y = 19, z = 3},
texture = "default_pine_sapling.png", texture = "default_pine_sapling.png",
}, },
{ description = "Olive Sapling", { description = S("Olive Sapling"),
sapling = "nalc_mediterranean:sapling_olive", sapling = "nalc_mediterranean:sapling_olive",
minp = {x = -3, y = 1, z = -3}, minp = {x = -3, y = 1, z = -3},
maxp = {x = 3, y = 9, z = 3}, maxp = {x = 3, y = 9, z = 3},

View File

@ -0,0 +1,10 @@
# textdomain: nalc_mediterranean
Dirt with Mediterranean Grass=Terre avec de l'herbe méditerranéenne
Mediterranean Pine Needles=Aiguilles de pin méditerranéen
Olive tree trunk=Tronc d'olivier
Olive Leaves=Feuilles d'olivier
Umbrella Pine Sapling=Pousse de pin parasol
Maritime Pine Sapling=Pousse de pin maritime
Cypress Sapling=Pousse de cyprès
Olive Sapling=Pousse d'olivier

View File

@ -0,0 +1,10 @@
# textdomain: nalc_mediterranean
Dirt with Mediterranean Grass=
Mediterranean Pine Needles=
Olive tree trunk=
Olive Leaves=
Umbrella Pine Sapling=
Maritime Pine Sapling=
Cypress Sapling=
Olive Sapling=

View File

@ -1,8 +1,10 @@
local S = minetest.get_translator("nalc_mobs")
-- scorched stuff -- scorched stuff
minetest.register_craftitem( minetest.register_craftitem(
":mobs:scorched_stuff", ":mobs:scorched_stuff",
{ {
description = "Scorched Stuff", description = S("Scorched Stuff"),
inventory_image = "default_scorched_stuff.png", inventory_image = "default_scorched_stuff.png",
}) })
@ -31,7 +33,7 @@ minetest.register_alias("default:scorched_stuff", "mobs:scorched_stuff")
minetest.register_tool( minetest.register_tool(
":mobs:dungeon_master_sword", ":mobs:dungeon_master_sword",
{ {
description = "Dungeon Master's Blood Sword (Warrior)", description = S("Dungeon Master's Blood Sword (Warrior)"),
inventory_image = "default_tool_dungeon_master_s_blood_sword.png", inventory_image = "default_tool_dungeon_master_s_blood_sword.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.5, full_punch_interval = 0.5,
@ -54,13 +56,7 @@ minetest.register_craft(
}) })
if minetest.get_modpath("toolranks") then if minetest.get_modpath("toolranks") then
minetest.override_item( toolranks.add_tool("mobs:dungeon_master_sword")
"mobs:dungeon_master_sword",
{
original_description = "Dungeon Master's Blood Sword",
description = toolranks.create_description("Dungeon Master's Blood Sword", 0, 1),
after_use = toolranks.new_afteruse
})
end end
minetest.register_alias("nalc:dungeon_master_s_blood_sword", "mobs:dungeon_master_sword") minetest.register_alias("nalc:dungeon_master_s_blood_sword", "mobs:dungeon_master_sword")

View File

@ -0,0 +1,4 @@
# textdomain: nalc_mobs
Scorched Stuff=Chose brûlée
Dungeon Master's Blood Sword (Warrior)=Épée de sang du maître du donjon (Guerrier)

View File

@ -0,0 +1,4 @@
# textdomain: nalc_mobs
Scorched Stuff=
Dungeon Master's Blood Sword (Warrior)=

View File

@ -1,3 +1,5 @@
local S = minetest.get_translator("nalc_moognu")
minetest.register_craft({ minetest.register_craft({
type = "fuel", type = "fuel",
recipe = "nyancat:nyancat", recipe = "nyancat:nyancat",
@ -56,7 +58,7 @@ minetest.register_craft(
minetest.register_tool( minetest.register_tool(
":nalc:pick_nyan", ":nalc:pick_nyan",
{ {
description = "Nyan Pickaxe", description = S("Nyan Pickaxe"),
inventory_image = "default_tool_nyanpick.png", inventory_image = "default_tool_nyanpick.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.9, full_punch_interval = 0.9,
@ -72,7 +74,7 @@ minetest.register_tool(
minetest.register_tool( minetest.register_tool(
":nalc:shovel_nyan", ":nalc:shovel_nyan",
{ {
description = "Nyan Shovel", description = S("Nyan Shovel"),
inventory_image = "default_tool_nyanshovel.png", inventory_image = "default_tool_nyanshovel.png",
wield_image = "default_tool_nyanshovel.png^[transformR90", wield_image = "default_tool_nyanshovel.png^[transformR90",
tool_capabilities = { tool_capabilities = {
@ -88,7 +90,7 @@ minetest.register_tool(
minetest.register_tool( minetest.register_tool(
":nalc:axe_nyan", ":nalc:axe_nyan",
{ {
description = "Nyan Axe", description = S("Nyan Axe"),
inventory_image = "default_tool_nyanaxe.png", inventory_image = "default_tool_nyanaxe.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 1.2, full_punch_interval = 1.2,
@ -104,7 +106,7 @@ minetest.register_tool(
minetest.register_tool( minetest.register_tool(
":nalc:sword_nyan", ":nalc:sword_nyan",
{ {
description = "Nyan Sword", description = S("Nyan Sword"),
inventory_image = "default_tool_nyansword.png", inventory_image = "default_tool_nyansword.png",
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.65, full_punch_interval = 0.65,
@ -123,27 +125,10 @@ minetest.register_alias("default:sword_nyan", "nalc:sword_nyan")
-- Toolranks -- Toolranks
if minetest.get_modpath("toolranks") then if minetest.get_modpath("toolranks") then
minetest.override_item( toolranks.add_tool("nalc:pick_nyan")
"nalc:pick_nyan", toolranks.add_tool("nalc:axe_nyan")
{ toolranks.add_tool("nalc:shovel_nyan")
original_description = "Nyan Pickaxe", toolranks.add_tool("nalc:sword_nyan")
description = toolranks.create_description("Nyan Pickaxe", 0, 1),
after_use = toolranks.new_afteruse
})
minetest.override_item(
"nalc:axe_nyan",
{
original_description = "Nyan Axe",
description = toolranks.create_description("Nyan Axe", 0, 1),
after_use = toolranks.new_afteruse
})
minetest.override_item(
"nalc:shovel_nyan",
{
original_description = "Nyan Shovel",
description = toolranks.create_description("Nyan Shovel", 0, 1),
after_use = toolranks.new_afteruse
})
end end
minetest.log("action", "[nalc_moognu] loaded.") minetest.log("action", "[nalc_moognu] loaded.")

View File

@ -0,0 +1,6 @@
# textdomain: nalc_moognu
Nyan Pickaxe=Pioche en Nyan
Nyan Shovel=Pelle en Nyan
Nyan Axe=Hache en Nyan
Nyan Sword=Épée en Nyan

View File

@ -0,0 +1,6 @@
# textdomain: nalc_moognu
Nyan Pickaxe=
Nyan Shovel=
Nyan Axe=
Nyan Sword=