diff --git a/mods/ITEMS/mcl_bamboo/bamboo_items.lua b/mods/ITEMS/mcl_bamboo/bamboo_items.lua index a7a28257e..83f26b340 100644 --- a/mods/ITEMS/mcl_bamboo/bamboo_items.lua +++ b/mods/ITEMS/mcl_bamboo/bamboo_items.lua @@ -208,7 +208,7 @@ if minetest.get_modpath("mcl_fences") then wood_groups, minetest.registered_nodes["mcl_core:wood"]._mcl_hardness, minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance, - node_sound) -- note: about missing params.. will use defaults. + node_sound) mcl_bamboo.mcl_log(dump(fence_id)) mcl_bamboo.mcl_log(dump(gate_id)) diff --git a/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.fr.tr b/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.fr.tr index 2f6b7db22..7cc9bd47c 100644 --- a/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.fr.tr +++ b/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.fr.tr @@ -19,6 +19,6 @@ Cherry Slab=Dalle en cerisier Double Cherry Slab=Double Dalle en cerisier Cherry Sign=Panneau de cerisier Cherry Fence=Barrière en cerisier -Cherry Gate=Portillion en cerisier +Cherry Fence Gate=Portillion en cerisier Cherry Pressure Plate=Plaque de pression en cerisier Cherry Button=Bouton de Cerisier diff --git a/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.pt_BR.tr b/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.pt_BR.tr index e3dc6d2fd..1cbe31bd2 100644 --- a/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.pt_BR.tr +++ b/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.pt_BR.tr @@ -19,6 +19,6 @@ Cherry Slab=Laje de Cerejeira Double Cherry Slab=Laje Dupla de Cerejeira Cherry Sign=Placa de Cerejeira Cherry Fence=Cerca de Cerejeira -Cherry Gate=Portão de Cerejeira +Cherry Fence Gate=Portão de Cerejeira Cherry Pressure Plate=Placa de Pressão de Cerejeira Cherry Button=Botão de Cerejeira diff --git a/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.ru.tr b/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.ru.tr index 1dc530f7a..9959561d2 100644 --- a/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.ru.tr +++ b/mods/ITEMS/mcl_cherry_blossom/locale/mcl_cherry_blossom.ru.tr @@ -19,6 +19,6 @@ Cherry Slab=Вишнёвая плита Double Cherry Slab=Двойная вишнёвая плита Cherry Sign=Вишнёвая табличка Cherry Fence=Вишнёвый забор -Cherry Gate=Вишнёвая калитка +Cherry Fence Gate=Вишнёвая калитка Cherry Pressure Plate=Вишнёвая нажимная плита Cherry Button=Вишнёвая кнопка diff --git a/mods/ITEMS/mcl_cherry_blossom/locale/template.txt b/mods/ITEMS/mcl_cherry_blossom/locale/template.txt index 39ba7026a..a1aee1194 100644 --- a/mods/ITEMS/mcl_cherry_blossom/locale/template.txt +++ b/mods/ITEMS/mcl_cherry_blossom/locale/template.txt @@ -19,6 +19,6 @@ Cherry Slab= Double Cherry Slab= Cherry Sign= Cherry Fence= -Cherry Gate= +Cherry Fence Gate= Cherry Pressure Plate= Cherry Button= diff --git a/mods/ITEMS/mcl_cherry_blossom/nodes.lua b/mods/ITEMS/mcl_cherry_blossom/nodes.lua index 84d1a8a1b..5b9e0ce49 100644 --- a/mods/ITEMS/mcl_cherry_blossom/nodes.lua +++ b/mods/ITEMS/mcl_cherry_blossom/nodes.lua @@ -69,7 +69,7 @@ mcl_signs.register_sign_custom("mcl_cherry_blossom", "_cherrywood", mcl_fences.register_fence_and_fence_gate( "cherry_fence", S("Cherry Fence"), - S("Cherry Gate"), + S("Cherry Fence Gate"), "mcl_cherry_blossom_planks.png", {handy=1, axey=1, flammable=2, fence_wood=1, fire_encouragement=5, fire_flammability=20}, minetest.registered_nodes["mcl_core:wood"]._mcl_hardness, diff --git a/mods/ITEMS/mcl_ocean/prismarine.lua b/mods/ITEMS/mcl_ocean/prismarine.lua index 32d17538d..fff07cb7e 100644 --- a/mods/ITEMS/mcl_ocean/prismarine.lua +++ b/mods/ITEMS/mcl_ocean/prismarine.lua @@ -52,7 +52,7 @@ minetest.register_node("mcl_ocean:prismarine_brick", { tiles = {"mcl_ocean_prismarine_bricks.png"}, groups = {pickaxey=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), - _mcl_blast_resistance = 1.5, + _mcl_blast_resistance = 6, _mcl_hardness = 1.5, }) @@ -64,7 +64,7 @@ minetest.register_node("mcl_ocean:prismarine_dark", { tiles = {"mcl_ocean_prismarine_dark.png"}, groups = {pickaxey=1, building_block=1, material_stone=1}, sounds = mcl_sounds.node_sound_stone_defaults(), - _mcl_blast_resistance = 1.5, + _mcl_blast_resistance = 6, _mcl_hardness = 1.5, }) diff --git a/mods/ITEMS/mcl_walls/API.md b/mods/ITEMS/mcl_walls/API.md index 8adf6e8b4..63621ade1 100644 --- a/mods/ITEMS/mcl_walls/API.md +++ b/mods/ITEMS/mcl_walls/API.md @@ -2,7 +2,7 @@ This API allows you to add more walls (like the cobblestone wall) to VoxeLibre. -## `mcl_walls.register_wall(nodename, description, craft_material, tiles, invtex, groups, sounds)` +## `mcl_walls.register_wall(nodename, description, craft_material, tiles, invtex, groups, sounds, hardness, blast_resistance)` Adds a new wall type. This is optimized for stone-based walls, but other materials are theoretically possible, too. @@ -25,6 +25,8 @@ If `craft_material` is not `nil` it also adds a crafting recipe of the following * `inventory_image`: Inventory image (optional if `source` is set) * `groups`: Base group memberships (optional, default is `{pickaxey=1}`) * `sounds`: Sound table (optional, by default default uses stone sounds) +* `hardness`: Hardness of node (optional, default matches `source` node or fallback value 2) +* `blast_resistance`: Blast resistance of node (optional, default matches `source` node or fallback value 6) The following groups will automatically be added to the nodes (where applicable), you do not need to add them to the `groups` table: diff --git a/mods/ITEMS/mcl_walls/init.lua b/mods/ITEMS/mcl_walls/init.lua index 57212e7dd..09a35b549 100644 --- a/mods/ITEMS/mcl_walls/init.lua +++ b/mods/ITEMS/mcl_walls/init.lua @@ -97,8 +97,10 @@ local full_blocks = { * inventory_image: Inventory image (optional) * groups: Base group memberships (optional, default is {pickaxey=1}) * sounds: Sound table (optional, default is stone) +* hardness: Hardness of node (optional, default matches `source` node or fallback value 2) +* blast_resistance: Blast resistance of node (optional, default matches `source` node or fallback value 6) ]] -function mcl_walls.register_wall(nodename, description, source, tiles, inventory_image, groups, sounds) +function mcl_walls.register_wall(nodename, description, source, tiles, inventory_image, groups, sounds, hardness, blast_resistance) local base_groups = groups if not base_groups then @@ -112,15 +114,29 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory local main_node_groups = table.copy(base_groups) main_node_groups.deco_block = 1 - -- TODO: Stop hardcoding blast resistance - - if not sounds then - sounds = mcl_sounds.node_sound_stone_defaults() - end - - if (not tiles) and source then - if minetest.registered_nodes[source] then - tiles = minetest.registered_nodes[source].tiles + if source then + -- Default values from `source` node + if not hardness then + hardness = minetest.registered_nodes[source]._mcl_hardness + end + if not blast_resistance then + blast_resistance = minetest.registered_nodes[source]._mcl_blast_resistance + end + if not sounds then + sounds = minetest.registered_nodes[source].sounds + end + if not tiles then + if minetest.registered_nodes[source] then + tiles = minetest.registered_nodes[source].tiles + end + end + else + -- Fallback in case no `source` given + if not hardness then + hardness = 2 + end + if not blast_resistance then + blast_resistance = 6 end end @@ -169,8 +185,8 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory fixed = take }, sounds = sounds, - _mcl_blast_resistance = 6, - _mcl_hardness = 2, + _mcl_blast_resistance = blast_resistance, + _mcl_hardness = hardness, }) -- Add entry alias for the Help @@ -197,8 +213,8 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory fixed = {pillar, full_blocks[1]} }, sounds = sounds, - _mcl_blast_resistance = 6, - _mcl_hardness = 2, + _mcl_blast_resistance = blast_resistance, + _mcl_hardness = hardness, }) -- Add entry alias for the Help if minetest.get_modpath("doc") then @@ -223,8 +239,8 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory fixed = {pillar, full_blocks[2]} }, sounds = sounds, - _mcl_blast_resistance = 6, - _mcl_hardness = 2, + _mcl_blast_resistance = blast_resistance, + _mcl_hardness = hardness, }) -- Add entry alias for the Help if minetest.get_modpath("doc") then @@ -255,8 +271,8 @@ function mcl_walls.register_wall(nodename, description, source, tiles, inventory collisionbox = {-0.2, 0, -0.2, 0.2, 1.4, 0.2}, on_construct = update_wall, sounds = sounds, - _mcl_blast_resistance = 6, - _mcl_hardness = 2, + _mcl_blast_resistance = blast_resistance, + _mcl_hardness = hardness, }) if source then minetest.register_craft({