Fix codestyle and translation of `mcl_amethyst`

This commit is contained in:
AFCMS 2022-05-03 22:56:11 +02:00 committed by cora
parent f4020ebd31
commit 00c70014c7
4 changed files with 53 additions and 68 deletions

View File

@ -1,5 +1,3 @@
local S = minetest.get_translator(minetest.get_current_modname())
local interval = 10 local interval = 10
local chance = 5 local chance = 5
@ -28,12 +26,12 @@ minetest.register_abm({
}) })
local all_directions = { local all_directions = {
vector.new(1,0,0), vector.new(1, 0, 0),
vector.new(0,1,0), vector.new(0, 1, 0),
vector.new(0,0,1), vector.new(0, 0, 1),
vector.new(-1,0,0), vector.new(-1, 0, 0),
vector.new(0,-1,0), vector.new(0, -1, 0),
vector.new(0,0,-1), vector.new(0, 0, -1),
} }
minetest.register_abm({ minetest.register_abm({

View File

@ -1,33 +1,27 @@
local S = minetest.get_translator(minetest.get_current_modname()) local S = minetest.get_translator(minetest.get_current_modname())
mcl_amethyst = {}
local sounds = mcl_sounds.node_sound_glass_defaults({ local sounds = mcl_sounds.node_sound_glass_defaults({
footstep = {name="amethyst_walk", gain=0.4}, footstep = {name = "amethyst_walk", gain = 0.4},
dug = {name="amethyst_break", gain=0.44}, dug = {name = "amethyst_break", gain = 0.44},
}) })
-- Amethyst block -- Amethyst block
minetest.register_node("mcl_amethyst:amethyst_block",{ minetest.register_node("mcl_amethyst:amethyst_block",{
description = S("Block of Amethyst"), description = S("Block of Amethyst"),
_doc_items_longdesc = S("The Block of Amethyst is a decoration block crafted from amethyst shards."),
tiles = {"amethyst_block.png"}, tiles = {"amethyst_block.png"},
_mcl_hardness = 1.5, groups = {pickaxey = 1, building_block = 1},
_mcl_blast_resistance = 1.5,
groups = {
pickaxey = 1,
building_block = 1,
},
sounds = sounds, sounds = sounds,
is_ground_content = true, is_ground_content = true,
stack_max = 64, _mcl_hardness = 1.5,
_doc_items_longdesc = S("The Block of Amethyst is a decoration block crafted from amethyst shards."), _mcl_blast_resistance = 1.5,
}) })
minetest.register_node("mcl_amethyst:budding_amethyst_block",{ minetest.register_node("mcl_amethyst:budding_amethyst_block",{
description = S("Budding Amethyst"), description = S("Budding Amethyst"),
_doc_items_longdesc = S("The Budding Amethyst can grow amethyst"),
tiles = {"budding_amethyst.png"}, tiles = {"budding_amethyst.png"},
drop = "", drop = "",
_mcl_hardness = 1.5,
_mcl_blast_resistance = 1.5,
groups = { groups = {
pickaxey = 1, pickaxey = 1,
building_block = 1, building_block = 1,
@ -35,56 +29,48 @@ minetest.register_node("mcl_amethyst:budding_amethyst_block",{
}, },
sounds = sounds, sounds = sounds,
is_ground_content = true, is_ground_content = true,
stack_max = 64, _mcl_hardness = 1.5,
_doc_items_longdesc = S("The Budding Amethyst can grow amethyst"), _mcl_blast_resistance = 1.5,
}) })
mcl_wip.register_wip_item("mcl_amethyst:budding_amethyst_block") mcl_wip.register_wip_item("mcl_amethyst:budding_amethyst_block")
-- Amethyst Shard -- Amethyst Shard
minetest.register_craftitem("mcl_amethyst:amethyst_shard",{ minetest.register_craftitem("mcl_amethyst:amethyst_shard",{
description = S("Amethyst Shard"), description = S("Amethyst Shard"),
inventory_image = "amethyst_shard.png",
stack_max = 64,
groups = {
craftitem = 1,
},
_doc_items_longdesc = S("An amethyst shard is a crystalline mineral."), _doc_items_longdesc = S("An amethyst shard is a crystalline mineral."),
inventory_image = "amethyst_shard.png",
groups = {craftitem = 1},
}) })
-- Calcite -- Calcite
minetest.register_node("mcl_amethyst:calcite",{ minetest.register_node("mcl_amethyst:calcite",{
description = S("Calcite"), description = S("Calcite"),
_doc_items_longdesc = S("Calcite can be found as part of amethyst geodes."),
tiles = {"calcite.png"}, tiles = {"calcite.png"},
_mcl_hardness = 0.75,
_mcl_blast_resistance = 0.75,
groups = { groups = {
pickaxey = 1, pickaxey = 1,
building_block = 1, building_block = 1,
}, },
sounds = mcl_sounds.node_sound_stone_defaults(), sounds = mcl_sounds.node_sound_stone_defaults(),
is_ground_content = true, is_ground_content = true,
stack_max = 64, _mcl_hardness = 0.75,
_doc_items_longdesc = S("Calcite can be found as part of amethyst geodes."), _mcl_blast_resistance = 0.75,
}) })
-- Tinied Glass -- Tinied Glass
minetest.register_node("mcl_amethyst:tinted_glass",{ minetest.register_node("mcl_amethyst:tinted_glass",{
description = S("Tinted Glass"), description = S("Tinted Glass"),
_doc_items_longdesc = S("Tinted Glass is a type of glass which blocks lights while it is visually transparent."),
tiles = {"tinted_glass.png"}, tiles = {"tinted_glass.png"},
_mcl_hardness = 0.3, _mcl_hardness = 0.3,
_mcl_blast_resistance = 0.3, _mcl_blast_resistance = 0.3,
drawtype = "glasslike", drawtype = "glasslike",
use_texture_alpha = "clip", use_texture_alpha = "blend",
sunlight_propagates = false, sunlight_propagates = false,
groups = { groups = {handy = 1, building_block = 1, deco_block = 1},
handy = 1,
building_block = 1,
deco_block = 1,
},
sounds = mcl_sounds.node_sound_glass_defaults(), sounds = mcl_sounds.node_sound_glass_defaults(),
is_ground_content = false, is_ground_content = false,
stack_max = 64,
_doc_items_longdesc = S("Tinted Glass is a type of glass which blocks lights while it is visually transparent."),
}) })
-- Amethyst Cluster -- Amethyst Cluster
@ -114,6 +100,7 @@ local bud_def = {
selection_box = { -4.5/16, -8/16, -4.5/16, 4.5/16, -1/16, 4.5/16 }, selection_box = { -4.5/16, -8/16, -4.5/16, 4.5/16, -1/16, 4.5/16 },
}, },
} }
for _, def in pairs(bud_def) do for _, def in pairs(bud_def) do
local size = def.size local size = def.size
local name = "mcl_amethyst:" .. size .. "_amethyst_bud" local name = "mcl_amethyst:" .. size .. "_amethyst_bud"
@ -121,8 +108,7 @@ for _, def in pairs(bud_def) do
local inventory_image = size .. "_amethyst_bud.png" local inventory_image = size .. "_amethyst_bud.png"
minetest.register_node(name, { minetest.register_node(name, {
description = def.description, description = def.description,
_mcl_hardness = 1.5, _doc_items_longdesc = def.longdesc,
_mcl_blast_resistance = 1.5,
drop = "", drop = "",
tiles = {tile}, tiles = {tile},
inventory_image = inventory_image, inventory_image = inventory_image,
@ -147,16 +133,15 @@ for _, def in pairs(bud_def) do
type = "fixed", type = "fixed",
fixed = def.selection_box fixed = def.selection_box
}, },
_mcl_hardness = 1.5,
_mcl_blast_resistance = 1.5,
_mcl_silk_touch_drop = true, _mcl_silk_touch_drop = true,
_mcl_amethyst_next_grade = def.next_stage, _mcl_amethyst_next_grade = def.next_stage,
_doc_items_longdesc = def.longdesc,
}) })
end end
minetest.register_node("mcl_amethyst:amethyst_cluster",{ minetest.register_node("mcl_amethyst:amethyst_cluster",{
description = "Amethyst Cluster", description = "Amethyst Cluster",
_mcl_hardness = 1.5,
_mcl_blast_resistance = 1.5,
_doc_items_longdesc = S("Amethyst Cluster is the final growth of amethyst bud."), _doc_items_longdesc = S("Amethyst Cluster is the final growth of amethyst bud."),
drop = { drop = {
max_items = 1, max_items = 1,
@ -192,6 +177,8 @@ minetest.register_node("mcl_amethyst:amethyst_cluster",{
type = "fixed", type = "fixed",
fixed = { -4.8/16, -8/16, -4.8/16, 4.8/16, 3.9/16, 4.8/16 }, fixed = { -4.8/16, -8/16, -4.8/16, 4.8/16, 3.9/16, 4.8/16 },
}, },
_mcl_hardness = 1.5,
_mcl_blast_resistance = 1.5,
_mcl_silk_touch_drop = true, _mcl_silk_touch_drop = true,
}) })
@ -199,17 +186,17 @@ minetest.register_node("mcl_amethyst:amethyst_cluster",{
minetest.register_craft({ minetest.register_craft({
output = "mcl_amethyst:amethyst_block", output = "mcl_amethyst:amethyst_block",
recipe = { recipe = {
{"mcl_amethyst:amethyst_shard","mcl_amethyst:amethyst_shard",}, {"mcl_amethyst:amethyst_shard", "mcl_amethyst:amethyst_shard"},
{"mcl_amethyst:amethyst_shard","mcl_amethyst:amethyst_shard",}, {"mcl_amethyst:amethyst_shard", "mcl_amethyst:amethyst_shard"},
}, },
}) })
minetest.register_craft({ minetest.register_craft({
output = "mcl_amethyst:tinted_glass 2", output = "mcl_amethyst:tinted_glass 2",
recipe = { recipe = {
{"","mcl_amethyst:amethyst_shard",""}, {"", "mcl_amethyst:amethyst_shard", ""},
{"mcl_amethyst:amethyst_shard","mcl_core:glass","mcl_amethyst:amethyst_shard",}, {"mcl_amethyst:amethyst_shard", "mcl_core:glass", "mcl_amethyst:amethyst_shard",},
{"","mcl_amethyst:amethyst_shard",""}, {"", "mcl_amethyst:amethyst_shard", ""},
}, },
}) })

View File

@ -1,19 +1,19 @@
# textdomain: mcl_amethyst # textdomain: mcl_amethyst
Amethyst Cluster= Agrégat d'améthyste Amethyst Cluster=Agrégat d'améthyste
Amethyst Cluster is the final growth of amethyst bud.= L'agrégat d'améthyste est le stade final de la croissance du bourgeon d'améthyste. Amethyst Cluster is the final growth of amethyst bud.=L'agrégat d'améthyste est le stade final de la croissance du bourgeon d'améthyste.
Amethyst Shard= Eclat d'améthyste Amethyst Shard=Éclat d'améthyste
An amethyst shard is a crystalline mineral.= Un éclat d'améthyste est un minéral cristallin. An amethyst shard is a crystalline mineral.=Un éclat d'améthyste est un minéral cristallin.
Block of Amethyst= Bloc d'améthyste Block of Amethyst=Bloc d'améthyste
Budding Amethyst= Améthyste bourgeonante Budding Amethyst=Améthyste bourgeonante
Calcite= Calcite Calcite=Calcite
Calcite can be found as part of amethyst geodes.= La calcite peut être trouvée dans les géodes d'améthyste. Calcite can be found as part of amethyst geodes.=La calcite peut être trouvée dans les géodes d'améthyste.
Large Amethyst Bud= Grand bourgeon d'améthyste Large Amethyst Bud=Grand bourgeon d'améthyste
Large Amethyst Bud is the third growth of amethyst bud.= Le grand bourgeon d'améthyste est le troisième stade de la croissance du bourgeon d'améthyste. Large Amethyst Bud is the third growth of amethyst bud.=Le grand bourgeon d'améthyste est le troisième stade de la croissance du bourgeon d'améthyste.
Medium Amethyst Bud= Bourgeon d'améthyste moyen Medium Amethyst Bud=Bourgeon d'améthyste moyen
Medium Amethyst Bud is the second growth of amethyst bud.= Le bourgeon d'améthyste moyen est le deuxième stade de la croissance du bourgeon d'améthyste. Medium Amethyst Bud is the second growth of amethyst bud.=Le bourgeon d'améthyste moyen est le deuxième stade de la croissance du bourgeon d'améthyste.
Small Amethyst Bud= Petit bourgeon d'améthyste Small Amethyst Bud=Petit bourgeon d'améthyste
Small Amethyst Bud is the first growth of amethyst bud.= Le petit bourgeon d'améthyste est le premier stade de la croissance du bourgeon d'améthyste. Small Amethyst Bud is the first growth of amethyst bud.=Le petit bourgeon d'améthyste est le premier stade de la croissance du bourgeon d'améthyste.
The Block of Amethyst is a decoration block crafted from amethyst shards.= Le bloc d'améthyste est un bloc décoratif fabriqué à partir d'éclats d'améthyste. The Block of Amethyst is a decoration block crafted from amethyst shards.=Le bloc d'améthyste est un bloc décoratif fabriqué à partir d'éclats d'améthyste.
The Budding Amethyst can grow amethyst= L'améthyste bourgeonante peut faire croître de l'améthyste. The Budding Amethyst can grow amethyst=L'améthyste bourgeonante peut faire croître de l'améthyste.
Tinted Glass= Verre teinté Tinted Glass=Verre teinté
Tinted Glass is a type of glass which blocks lights while it is visually transparent.= Le verre teinté est un type de verre qui bloque la lumière tout en étant visuellement transparent. Tinted Glass is a type of glass which blocks lights while it is visually transparent.=Le verre teinté est un type de verre qui bloque la lumière tout en étant visuellement transparent.