diff options
-rw-r--r-- | aliases.lua | 18 | ||||
-rw-r--r-- | circular_saw.lua | 18 | ||||
-rw-r--r-- | crafting.lua | 45 | ||||
-rw-r--r-- | init.lua | 21 | ||||
-rw-r--r-- | locale/fr.txt | 50 | ||||
-rw-r--r-- | locale/template.txt | 70 | ||||
-rw-r--r-- | stairsplus.lua | 6 |
7 files changed, 134 insertions, 94 deletions
diff --git a/aliases.lua b/aliases.lua index 5df0a33..cabe2d9 100644 --- a/aliases.lua +++ b/aliases.lua @@ -186,3 +186,21 @@ minetest.register_alias("moreblocks:emptybookshelf", "moreblocks:empty_bookshelf minetest.register_alias("moreblocks:junglestick", "moreblocks:jungle_stick") minetest.register_alias("moreblocks:splitstonesquare","moreblocks:split_stone_tile") minetest.register_alias("moreblocks:allfacestree","moreblocks:all_faces_tree") + +-- ABM for Horizontal_tree (fix facedir). + +minetest.register_abm({ + nodenames = {"moreblocks:horizontal_tree","moreblocks:horizontal_jungle_tree"}, + interval = 1, + chance = 1, + action = function(pos, node) + local convert_facedir={7,12,9,18} + if node.name=="moreblocks:horizontal_tree" then + node.name="default:tree" + else + node.name="default:jungletree" + end + minetest.set_node(pos, {name=node.name,param2=convert_facedir[node.param2+1]}) + end, +}) + diff --git a/circular_saw.lua b/circular_saw.lua index 315662b..9747cda 100644 --- a/circular_saw.lua +++ b/circular_saw.lua @@ -101,7 +101,7 @@ circular_saw.reset_circular_saw = function(pos) inv:set_list("output", circular_saw.get_stair_output_inv("", "", 0, meta:get_string("max_offered"))); meta:set_int("anz", 0); - meta:set_string("infotext", "Circular saw, empty (owned by " .. (meta:get_string("owner") or "") .. ")"); + meta:set_string("infotext", S("Circular saw, empty (owned by %s)"):format((meta:get_string("owner") or ""))); end @@ -149,7 +149,7 @@ circular_saw.update_inventory = function(pos, amount) -- Store how many microblocks are available meta:set_int("anz", (akt+amount)); - meta:set_string("infotext", "Circular saw, working with " ..material.. " (owned by " .. (meta:get_string("owner") or "") .. ")"); + meta:set_string("infotext", S("Circular saw, working with %s (owned by %s)"):format(material,(meta:get_string("owner") or ""))); end @@ -276,7 +276,7 @@ circular_saw.on_construct_init = function(pos, formspec) meta:set_int( "anz", 0); -- No microblocks inside yet meta:set_string("max_offered", 99); -- How many items of this kind are offered by default? - meta:set_string("infotext", "Circular saw, empty") + meta:set_string("infotext", S("Circular saw, empty")) local inv = meta:get_inventory() inv:set_size("input", 1) -- Input slot for full blocks of material x @@ -329,13 +329,13 @@ minetest.register_node("moreblocks:circular_saw", { return circular_saw.on_construct_init(pos, "size[10,9]" .. "list[current_name;input;0,0;1,1;]" .. - "label[0,0;Input material]" .. + "label[0,0;"..S("Input material").."]" .. "list[current_name;micro;0,1;1,1;]" .. - "label[0,1;Rest/microblocks]" .. - "field[0.3,2.5;1,1;max_offered;Max:;${max_offered}]" .. - "button[1,2;1,1;Set;Set]" .. + "label[0,1;"..S("Rest/microblocks").."]" .. + "field[0.3,2.5;1,1;max_offered;"..S("Max:")..";${max_offered}]" .. + "button[1,2;1,1;Set;"..S("Set").."]" .. "list[current_name;recycle;0,3;1,1;]" .. - "label[0,3;Recycle output]" .. + "label[0,3;"..S("Recycle output").."]" .. "list[current_name;output;2,0;8,4;]" .. "list[current_player;main;1,5;8,4;]"); end, @@ -349,7 +349,7 @@ minetest.register_node("moreblocks:circular_saw", { local meta = minetest.env:get_meta(pos); meta:set_string("owner", (placer:get_player_name() or "")); - meta:set_string("infotext", "Circular saw is empty (owned by " .. (placer:get_player_name() or "") .. ")"); + meta:set_string("infotext", S("Circular saw is empty (owned by %s)"):format((placer:get_player_name() or ""))); end, -- The amount of items offered per shape can be configured diff --git a/crafting.lua b/crafting.lua index 8019772..3d52161 100644 --- a/crafting.lua +++ b/crafting.lua @@ -192,20 +192,6 @@ minetest.register_craft({ }) minetest.register_craft({ - output = "default:wood 4", - recipe = { - {"moreblocks:horizontal_tree"}, - } -}) - -minetest.register_craft({ - output = "default:junglewood 4", - recipe = { - {"moreblocks:horizontal_jungle_tree"}, - } -}) - -minetest.register_craft({ output = "moreblocks:plankstone 4", recipe = { {"default:stone", "default:wood"}, @@ -359,37 +345,6 @@ minetest.register_craft({ }) minetest.register_craft({ - output = "moreblocks:horizontal_tree 2", - recipe = { - {"default:tree", "", "default:tree"}, - } -}) - -minetest.register_craft({ - output = "default:tree 2", - recipe = { - {"moreblocks:horizontal_tree"}, - {"moreblocks:horizontal_tree"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:horizontal_jungle_tree 2", - recipe = { - {"default:jungletree", "", "default:jungletree"}, - } -}) - -minetest.register_craft({ - output = "default:jungletree 2", - recipe = { - {"moreblocks:horizontal_jungle_tree"}, - {"moreblocks:horizontal_jungle_tree"}, - } -}) - - -minetest.register_craft({ output = "moreblocks:circular_saw 1", recipe = { { "", "default:steel_ingot", "" }, @@ -272,26 +272,6 @@ minetest.register_node("moreblocks:fence_jungle_wood", { sounds = default.node_sound_wood_defaults(),
})
-minetest.register_node("moreblocks:horizontal_tree", {
- description = S("Horizontal Tree"),
- tiles = {"default_tree.png", "default_tree.png", "default_tree.png^[transformR90",
- "default_tree.png^[transformR90", "default_tree_top.png", "default_tree_top.png"},
- paramtype2 = "facedir",
- groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
- sounds = default.node_sound_wood_defaults(),
- furnace_burntime = 30,
-})
-
-minetest.register_node("moreblocks:horizontal_jungle_tree", {
- description = S("Horizontal Jungle Tree"),
- tiles = {"default_jungletree.png", "default_jungletree.png", "default_jungletree.png^[transformR90",
- "default_jungletree.png^[transformR90", "default_jungletree_top.png", "default_jungletree_top.png"},
- paramtype2 = "facedir",
- groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
- sounds = default.node_sound_wood_defaults(),
- furnace_burntime = 30,
-})
-
minetest.register_node("moreblocks:all_faces_tree", {
description = S("All-faces Tree"),
tiles = {"default_tree_top.png"},
@@ -388,7 +368,6 @@ minetest.register_craftitem("moreblocks:jungle_stick", { })
minetest.register_craftitem("moreblocks:nothing", {
- inventory_image = "invisible.png",
on_use = minetest.item_eat(0),
})
diff --git a/locale/fr.txt b/locale/fr.txt index e537a8c..6bd7f98 100644 --- a/locale/fr.txt +++ b/locale/fr.txt @@ -1,54 +1,72 @@ # Translation by Calinou -[moreblocks] loaded. = [moreblocks] a été chargé. +###init.lua### +[moreblocks] loaded. = [moreblocks] a été chargé. Jungle Wooden Planks = Planches de bois de jungle -Empty Bookshelf = Étagère vide +Empty Bookshelf = Ètagère vide Clean Glass = Verre propre Plankstone = Pierre-bois Wooden Tile = Dalle en bois -Full Wooden Tile = Dalle en bois complète -Centered Wooden Tile = Dalle en bois centrée +Full Wooden Tile = Dalle en bois complète +Centered Wooden Tile = Dalle en bois centrée Up Wooden Tile = Dalle en bois vers le haut Down Wooden Tile = Dalle en bois vers le bas Left Wooden Tile = Dalle en bois vers la gauche Right Wooden Tile = Dalle en bois vers la droite Circle Stone Bricks = Briques en pierre circulaires Stone Tile = Dalle en pierre -Split Stone Tile = Dalle en pierre découpée +Split Stone Tile = Dalle en pierre découpée Glow Glass = Verre brillant -Super Glow Glass = Verre très brillant -Coal Glass = Verre en charbon -Iron Glass = Verre en fer +Super Glow Glass = Verre très brillant +Coal Glass = Verre de charbon +Iron Glass = Verre de fer Coal Checker = Damier en charbon Iron Checker = Damier en fer -Trap Stone = Pierre à piège -Trap Glass = Verre à piège -Coal Stone = Pierre en charbon -Iron Stone = Pierre en fer +Trap Stone = Pierre traversable +Trap Glass = Verre traversable +Trap Glow Glass = Verre brillant traversable +Trap Super Glow Glass = Verre très brillant traversable +Coal Stone = Pierre de charbon +Iron Stone = Pierre de fer +Coal Stone Bricks = Briques en pierre de charbon +Iron Stone Bricks = Briques en pierre de fer Cactus Checker = Damier en cactus -Cactus Brick = Briques en cactus +Cactus Brick = Briques de cactus Sweeper = Balai -Jungle Stick = Bâton en bois de jungle +Jungle Stick = Bâton en bois de jungle Horizontal Tree = Tronc d'arbre horizontal Horizontal Jungle Tree = Tronc d'arbre de jungle horizontal Rope = Corde All-faces Tree = Tronc d'arbre +###redefinition.lua### Wooden = bois Papyrus = Papyrus Dry Shrub = Buisson mort Sapling = Pousse d'arbre Wooden Planks = Planches de bois -Ladder = Échelle +Ladder = Échelle Glass = Verre +###circular_saw.lua### Circular Saw = Scie circulaire +Circular saw, empty (owned by %s) = Scie circulaire, vide (propriété de %s) +Circular saw, working with %s (owned by %s) = Scie circulaire, manipule %s (propriété de %s) +Circular saw, empty = Scie circulaire, vide +Circular saw is empty (owned by %s) = Scie circulaire est vide (propriété de %s) +Input material = Entrée du matériel +Rest/microblocks = Reste/microbloc +Max: = Max: +Set = Fixer +Recycle output = Recyclage + +###./stairsplus/*### %s Stairs = Escaliers en %s %s Slab = Demi-dalle en %s %s Panel = Barre en %s %s Microblock = Microbloc en %s %s Pane = Panneau en %s -%s Fence = Barrière en %s +%s Fence = Barrière en %s
\ No newline at end of file diff --git a/locale/template.txt b/locale/template.txt new file mode 100644 index 0000000..77ed1a9 --- /dev/null +++ b/locale/template.txt @@ -0,0 +1,70 @@ +###init.lua### +[moreblocks] loaded. = + +Jungle Wooden Planks = +Empty Bookshelf = +Clean Glass = +Plankstone = +Wooden Tile = +Full Wooden Tile = +Centered Wooden Tile = +Up Wooden Tile = +Down Wooden Tile = +Left Wooden Tile = +Right Wooden Tile = +Circle Stone Bricks = +Stone Tile = +Split Stone Tile = +Glow Glass = +Super Glow Glass = +Coal Glass = +Iron Glass = +Coal Checker = +Iron Checker = +Trap Stone = +Trap Glass = +Trap Glow Glass = +Trap Super Glow Glass = +Coal Stone = +Iron Stone = +Coal Stone Bricks = +Iron Stone Bricks = +Cactus Checker = +Cactus Brick = +Sweeper = +Jungle Stick = +Horizontal Tree = +Horizontal Jungle Tree = +Rope = +All-faces Tree = + +###redefinition.lua### +Wooden = +Papyrus = +Dry Shrub = +Sapling = +Wooden Planks = +Ladder = +Glass = + +###circular_saw.lua### +Circular Saw = +Circular saw, empty (owned by %s) = +Circular saw, working with %s (owned by %s) = +Circular saw, empty = +Circular saw is empty (owned by %s) = + +Input material = +Rest/microblocks = +Max: = +Set = +Recycle output = + +###./stairsplus/*### +%s Stairs = +%s Slab = +%s Panel = +%s Microblock = + +%s Pane = +%s Fence =
\ No newline at end of file diff --git a/stairsplus.lua b/stairsplus.lua index 593a240..cd902d9 100644 --- a/stairsplus.lua +++ b/stairsplus.lua @@ -8,7 +8,7 @@ else stairsplus_expect_infinite_stacks = true end --- these vales are in order: facedir in degrees = 90, 0, 270, 180, 90 +-- These vales are in order: facedir in degrees = 90, 0, 270, 180, 90 local dirs1 = { 21, 20, 23, 22, 21 } local dirs2 = { 15, 8, 17, 6, 15 } @@ -116,7 +116,7 @@ function register_stair_slab_panel_micro(modname, subname, recipeitem, groups, i register_6dfacedir_conversion(modname, subname) end --- Default stairs/slabs/panels/microblocks +-- Default stairs/slabs/panels/microblocks. register_stair_slab_panel_micro("moreblocks", "wood", "default:wood", {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3}, @@ -241,7 +241,7 @@ register_stair_slab_panel_micro("moreblocks", "stonebrick", "default:stonebrick" {cracky=3}, {"default_stone_brick.png"}, "Stone Bricks", - "stone_bricks", + "stonebrick", 0) register_stair_slab_panel_micro("moreblocks", "desert_stonebrick", "default:desert_stonebrick", |