From f7df4cd52dc628a0ae9c890802f52ce74901620d Mon Sep 17 00:00:00 2001 From: alek13 Date: Sun, 25 Feb 2024 19:45:53 +0300 Subject: [PATCH] Wooden blocks: Refactoring `lottplants`: move `hardwood` into this mod (and rename). Relates to #1236 #1233 --- mods/_various/castle/tapestry.lua | 2 +- .../Blocks/lord_homedecor/building_blocks.lua | 2 +- mods/lord/Blocks/lord_homedecor/misc-nodes.lua | 6 +++--- mods/lord/Blocks/lottblocks/wooden_stuff.lua | 12 ++++++------ mods/lord/Blocks/lottplants/planks.lua | 17 +++++++++-------- .../textures/lottplants_hardwood.png} | Bin 6 files changed, 20 insertions(+), 19 deletions(-) rename mods/lord/Blocks/{lottblocks/textures/lottblocks_hardwood.png => lottplants/textures/lottplants_hardwood.png} (100%) diff --git a/mods/_various/castle/tapestry.lua b/mods/_various/castle/tapestry.lua index 83c7b158b..e32c008b7 100644 --- a/mods/_various/castle/tapestry.lua +++ b/mods/_various/castle/tapestry.lua @@ -31,7 +31,7 @@ local tapestry_tops = { { "castle:tapestry_top_junglewood", "lottblocks:stick_junglewood", SL("Jungle Wood"),"default_junglewood.png" }, { "castle:tapestry_top_alder", "lottblocks:stick_alder", SL("Alder"), "lottplants_alderwood.png" }, { "castle:tapestry_top_birch", "lottblocks:stick_birch", SL("Birch"), "lottplants_birchwood.png" }, - { "castle:tapestry_top_hardwood", "lottblocks:stick_hardwood", SL("Hardwood"), "lottblocks_hardwood.png" }, + { "castle:tapestry_top_hardwood", "lottblocks:stick_hardwood", SL("Hardwood"), "lottplants_hardwood.png" }, { "castle:tapestry_top_lebethron", "lottblocks:stick_lebethron", SL("Lebethron"), "lottplants_lebethronwood.png"}, { "castle:tapestry_top_mallorn", "lottblocks:stick_mallorn", SL("Mallorn"), "lottplants_mallornwood.png" }, { "castle:tapestry_top_pine", "lottblocks:stick_pine", SL("Pine"), "lottplants_pinewood.png" }, diff --git a/mods/lord/Blocks/lord_homedecor/building_blocks.lua b/mods/lord/Blocks/lord_homedecor/building_blocks.lua index 943a0c3ca..e20cd6da9 100644 --- a/mods/lord/Blocks/lord_homedecor/building_blocks.lua +++ b/mods/lord/Blocks/lord_homedecor/building_blocks.lua @@ -346,7 +346,7 @@ minetest.register_craftitem("lord_homedecor:sticks", { minetest.register_alias("fakegrass", "lord_homedecor:fakegrass") minetest.register_alias("adobe", "lord_homedecor:Adobe") minetest.register_alias("building_blocks_roofing", "lord_homedecor:Roofing") -minetest.register_alias("hardwood", "lord_homedecor:hardwood") +minetest.register_alias("hardwood", "lottplants:hardwood") minetest.register_alias("sticks", "lord_homedecor:sticks") minetest.register_alias("lord_homedecor:faggot", "lord_homedecor:sticks") diff --git a/mods/lord/Blocks/lord_homedecor/misc-nodes.lua b/mods/lord/Blocks/lord_homedecor/misc-nodes.lua index 85a06c1fe..ad2c4400c 100644 --- a/mods/lord/Blocks/lord_homedecor/misc-nodes.lua +++ b/mods/lord/Blocks/lord_homedecor/misc-nodes.lua @@ -150,9 +150,9 @@ lord_homedecor.banister_materials = { { "hardwood", "hardwood", - "lottblocks_hardwood.png", - "lottblocks_hardwood.png", - "lord_homedecor:hardwood", + "lottplants_hardwood.png", + "lottplants_hardwood.png", + "lottplants:hardwood", "lottblocks:stick_hardwood", "", "", diff --git a/mods/lord/Blocks/lottblocks/wooden_stuff.lua b/mods/lord/Blocks/lottblocks/wooden_stuff.lua index 8e497c663..5e37e95fb 100644 --- a/mods/lord/Blocks/lottblocks/wooden_stuff.lua +++ b/mods/lord/Blocks/lottblocks/wooden_stuff.lua @@ -95,9 +95,9 @@ local function register_fence(name, description_prefix, wood_name, node_groups) default.register_fence("lottblocks:fence_" .. name, { description = S(description_prefix .. " Fence"), texture = "lottblocks_fence_"..name..".png", - inventory_image = "default_fence_overlay.png^lottblocks_"..name..".png^" .. + inventory_image = "default_fence_overlay.png^lottplants_"..name..".png^" .. "default_fence_overlay.png^[makealpha:255,126,126", - wield_image = "default_fence_overlay.png^lottblocks_"..name..".png^" .. + wield_image = "default_fence_overlay.png^lottplants_"..name..".png^" .. "default_fence_overlay.png^[makealpha:255,126,126", material = wood_name, groups = node_groups, @@ -105,10 +105,10 @@ local function register_fence(name, description_prefix, wood_name, node_groups) }) default.register_fence_rail("lottblocks:fence_rail_" .. name, { description = S(description_prefix .. " Fence Rail"), - texture = "lottblocks_"..name..".png", - inventory_image = "default_fence_rail_overlay.png^lottblocks_"..name..".png^" .. + texture = "lottplants_"..name..".png", + inventory_image = "default_fence_rail_overlay.png^lottplants_"..name..".png^" .. "default_fence_rail_overlay.png^[makealpha:255,126,126", - wield_image = "default_fence_rail_overlay.png^lottblocks_"..name..".png^" .. + wield_image = "default_fence_rail_overlay.png^lottplants_"..name..".png^" .. "default_fence_rail_overlay.png^[makealpha:255,126,126", material = wood_name, groups = node_groups, @@ -401,7 +401,7 @@ lottblocks.register_wooden_stuff("birch", "Birch", "lottplants_birchwood.png", " lottblocks.register_wooden_stuff("pine", "Pine", "lottplants_pinewood.png", "lottplants:pinewood") lottblocks.register_wooden_stuff("lebethron", "Lebethron", "lottplants_lebethronwood.png", "lottplants:lebethronwood") lottblocks.register_wooden_stuff("mallorn", "Mallorn", "lottplants_mallornwood.png", "lottplants:mallornwood") -lottblocks.register_wooden_stuff("hardwood", "Hardwood", "lottblocks_hardwood.png", "lord_homedecor:hardwood") +lottblocks.register_wooden_stuff("hardwood", "Hardwood", "lottplants_hardwood.png", "lottplants:hardwood") minetest.register_alias("lottblocks:wooden_stanchion", "lottblocks:wood_stanchion") minetest.register_alias("lottblocks:fence_junglewood", "default:fence_junglewood") diff --git a/mods/lord/Blocks/lottplants/planks.lua b/mods/lord/Blocks/lottplants/planks.lua index 3632bcd1c..33e55574d 100644 --- a/mods/lord/Blocks/lottplants/planks.lua +++ b/mods/lord/Blocks/lottplants/planks.lua @@ -49,13 +49,14 @@ minetest.register_node("lottplants:mallornwood", { place_param2 = 0, }) -minetest.register_node(":lord_homedecor:hardwood", { - tiles = {"lottblocks_hardwood.png"}, +minetest.register_node("lottplants:hardwood", { + tiles = {"lottplants_hardwood.png"}, is_ground_content = true, description = S("Hardwood"), - groups = {choppy=1,flammable=1,wood=1}, + groups = { choppy = 1, flammable = 1, wood = 1 }, sounds = default.node_sound_wood_defaults(), }) +minetest.register_alias("lord_homedecor:hardwood", "lottplants:hardwood") minetest.register_node("lottplants:firwood", { description = S("Fir Planks"), @@ -150,9 +151,9 @@ stairs.register_stair_and_slab( stairs.register_stair_and_slab( "hardwood", - "lord_homedecor:hardwood", + "lottplants:hardwood", {choppy=1,flammable=1}, - {"lottblocks_hardwood.png"}, + {"lottplants_hardwood.png"}, S("Hardwood stair"), S("Hardwood slab"), default.node_sound_wood_defaults(), @@ -216,14 +217,14 @@ minetest.register_craft({ -- different craft for hardwood minetest.register_craft({ - output = 'lord_homedecor:hardwood 2', + output = 'lottplants:hardwood 2', recipe = { {"default:wood", "default:junglewood"}, {"default:junglewood", "default:wood"}, } }) minetest.register_craft({ - output = 'lord_homedecor:hardwood 2', + output = 'lottplants:hardwood 2', recipe = { {"default:junglewood", "default:wood"}, {"default:wood", "default:junglewood"}, @@ -233,6 +234,6 @@ minetest.register_craft({ -- hardwood burned slower minetest.register_craft({ type = "fuel", - recipe = "lord_homedecor:hardwood", + recipe = "lottplants:hardwood", burntime = 28, }) diff --git a/mods/lord/Blocks/lottblocks/textures/lottblocks_hardwood.png b/mods/lord/Blocks/lottplants/textures/lottplants_hardwood.png similarity index 100% rename from mods/lord/Blocks/lottblocks/textures/lottblocks_hardwood.png rename to mods/lord/Blocks/lottplants/textures/lottplants_hardwood.png