From 9a81477bde153422d40a9f576ab5e628568b16ab Mon Sep 17 00:00:00 2001 From: h-v-smacker Date: Wed, 29 Aug 2018 14:09:45 +0300 Subject: more microblocks compatibility --- adaptions.lua | 7 ++++- nodes_barrel.lua | 4 +-- nodes_doorlike.lua | 2 +- nodes_fences.lua | 8 ++--- nodes_historic.lua | 85 +++++++++++++++++++++++++++++++++++++----------------- nodes_mining.lua | 7 +++-- nodes_roof.lua | 74 +++++++++++++++++++++++++++++++++++++++++++---- 7 files changed, 144 insertions(+), 43 deletions(-) diff --git a/adaptions.lua b/adaptions.lua index 5d59e1b..9a46a04 100644 --- a/adaptions.lua +++ b/adaptions.lua @@ -16,6 +16,11 @@ cottages.craftitem_wood = "group:wood"; cottages.craftitem_door = "doors:door_wood"; -- used for: small fence cottages.craftitem_fence = "default:fence_wood"; + +if minetest.get_modpath("ethereal") then + cottages.craftitem_fence = "group:fence"; +end + -- used for: bed (head+foot), wool for tents cottages.craftitem_wool = "wool:white"; -- used for: washing place, loam @@ -72,7 +77,7 @@ if( not( minetest.registered_nodes["default:tree"])) then cottages.craftitem_steel = "metals:pig_iron_ingot"; -- stone exists, but is hard to obtain; chiseled stone is more suitable cottages.craftitem_stone = "default:stone_flat"; - -- there are far more diffrent wood tpyes + -- there are far more diffrent wood types cottages.craftitem_wood = "group:planks"; cottages.craftitem_door = "doors:door_birch"; cottages.craftitem_fence = "group:fence"; diff --git a/nodes_barrel.lua b/nodes_barrel.lua index 946fb11..5d5da17 100644 --- a/nodes_barrel.lua +++ b/nodes_barrel.lua @@ -328,12 +328,12 @@ minetest.register_craft({ minetest.register_craft({ output = "cottages:tub 2", recipe = { - {"cottages:barrel"}, + {"cottages:barrel_open"}, }, }) minetest.register_craft({ - output = "cottages:barrel", + output = "cottages:barrel_open", recipe = { {"cottages:tub"}, {"cottages:tub"}, diff --git a/nodes_doorlike.lua b/nodes_doorlike.lua index 007b051..b4ff1a7 100644 --- a/nodes_doorlike.lua +++ b/nodes_doorlike.lua @@ -222,7 +222,7 @@ minetest.register_node("cottages:half_door_inverted", { ------------------------------------------------------------------------------------------------------------------------------ --- this gate for fences solves the "where to store the opened gate" problem by dropping it to the floor in optened state +-- this gate for fences solves the "where to store the opened gate" problem by dropping it to the floor in opened state ------------------------------------------------------------------------------------------------------------------------------ minetest.register_node("cottages:gate_closed", { description = S("Closed fence gate"), diff --git a/nodes_fences.lua b/nodes_fences.lua index c912f2a..50ad9de 100644 --- a/nodes_fences.lua +++ b/nodes_fences.lua @@ -110,7 +110,7 @@ minetest.register_node("cottages:fence_end", { }) minetest.register_craft({ - output = "cottages:fence_small 3", + output = "cottages:fence_small 4", recipe = { {cottages.craftitem_fence, cottages.craftitem_fence}, } @@ -121,7 +121,7 @@ if ( minetest.get_modpath("xfences") ~= nil ) then minetest.register_craft({ output = "cottages:fence_small 3", recipe = { - {"xfences:fence","xfences:fence" }, + {"xfences:fence", "xfences:fence" }, } }) end @@ -129,7 +129,7 @@ end minetest.register_craft({ output = "cottages:fence_corner", recipe = { - {"cottages:fence_small","cottages:fence_small" }, + {"cottages:fence_small", "cottages:fence_small" }, } }) @@ -143,7 +143,7 @@ minetest.register_craft({ minetest.register_craft({ output = "cottages:fence_end", recipe = { - {"cottages:fence_small","cottages:fence_small", "cottages:fence_small" }, + {"cottages:fence_small", "cottages:fence_small", "cottages:fence_small" }, } }) diff --git a/nodes_historic.lua b/nodes_historic.lua index 9cbafe4..44086e4 100644 --- a/nodes_historic.lua +++ b/nodes_historic.lua @@ -12,37 +12,69 @@ local S = cottages.S -- can be used to buid real stationary wagons or attached to walls as decoration minetest.register_node("cottages:wagon_wheel", { - description = S("Wagon wheel"), - drawtype = "signlike", - tiles = {"cottages_wagonwheel.png"}, -- done by VanessaE! - inventory_image = "cottages_wagonwheel.png", - wield_image = "cottages_wagonwheel.png", - paramtype = "light", - paramtype2 = "wallmounted", - - sunlight_propagates = true, - walkable = false, - selection_box = { - type = "wallmounted", - }, - groups = {choppy=2,dig_immediate=2,attached_node=1}, - legacy_wallmounted = true, - sounds = default.node_sound_defaults, + description = S("Wagon wheel"), + drawtype = "signlike", + tiles = {"cottages_wagonwheel.png"}, -- done by VanessaE! + inventory_image = "cottages_wagonwheel.png", + wield_image = "cottages_wagonwheel.png", + paramtype = "light", + paramtype2 = "wallmounted", + + sunlight_propagates = true, + walkable = false, + selection_box = { + type = "wallmounted", + }, + groups = {choppy=2,dig_immediate=2,attached_node=1}, + legacy_wallmounted = true, + sounds = default.node_sound_defaults, is_ground_content = false, }) -- people didn't use clay for houses; they did build with loam minetest.register_node("cottages:loam", { - description = S("Loam"), - tiles = {"cottages_loam.png"}, + description = S("Loam"), + tiles = {"cottages_loam.png"}, groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}, - groups = {crumbly=3}, - sounds = default.node_sound_dirt_defaults, + groups = {crumbly=3}, + sounds = default.node_sound_dirt_defaults, is_ground_content = false, }) -- create stairs if possible + + +if stairs and stairs.mod and stairs.mod == "redo" then + + stairs.register_all("loam", "cottages:loam", + {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2}, + {"cottages_loam.png"}, + S("Loam stair"), + S("Loam slab"), + default.node_sound_dirt_defaults()) + +elseif minetest.global_exists("stairsplus") then + + stairsplus:register_all("cottages", "loam", "cottages:loam", { + description = S("Loam"), + tiles = {"cottages_loam.png"}, + groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2}, + sounds = default.node_sound_dirt_defaults(), + }) + +else + + stairs.register_stair_and_slab("loam", "cottages:loam", + {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2}, + {"cottages_loam.png"}, + S("Loam stair"), + S("Loam slab"), + default.node_sound_dirt_defaults()) + + +end +--[[ if( minetest.get_modpath("stairs") and stairs and stairs.register_stair_and_slab) then stairs.register_stair_and_slab("loam", "cottages:loam", @@ -60,17 +92,16 @@ if( minetest.get_modpath("stairs") and stairs and stairs.register_stair_and_slab S("Clay slab"), default.node_sound_dirt_defaults()) end -end +end]] -- straw is a common material for places where animals are kept indoors -- right now, this block mostly serves as a placeholder minetest.register_node("cottages:straw_ground", { - description = S("Straw ground for animals"), - tiles = {"cottages_darkage_straw.png","cottages_loam.png","cottages_loam.png","cottages_loam.png","cottages_loam.png","cottages_loam.png"}, - groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}, - groups = {crumbly=3}, - sounds = default.node_sound_dirt_defaults, + description = S("Straw ground for animals"), + tiles = {"cottages_darkage_straw.png","cottages_loam.png","cottages_loam.png","cottages_loam.png","cottages_loam.png","cottages_loam.png"}, + groups = {snappy=2,crumbly=3,choppy=2,oddly_breakable_by_hand=2}, + sounds = default.node_sound_dirt_defaults, is_ground_content = false, }) @@ -208,7 +239,7 @@ minetest.register_craft({ {"", "cottages:wagon_wheel", "" }, {cottages.craftitem_dirt,cottages.craftitem_dirt,cottages.craftitem_dirt } }, - replacements = { {'cottages:wagon_wheel', 'cottages:wagon_wheel'}, } + replacements = { {'cottages:wagon_wheel', 'cottages:wagon_wheel'}, } }) minetest.register_craft({ diff --git a/nodes_mining.lua b/nodes_mining.lua index 8607b61..094fa21 100644 --- a/nodes_mining.lua +++ b/nodes_mining.lua @@ -43,8 +43,8 @@ minetest.register_node("cottages:ladder_with_rope_and_rail", { description = S("Ladder with rail support"), drawtype = "signlike", tiles = {"default_ladder_wood.png^carts_rail_straight.png^cottages_rope.png"}, - inventory_image = "default_ladder_wood.png", - wield_image = "default_ladder_wood.png", + inventory_image = "default_ladder_wood.png^carts_rail_straight.png^cottages_rope.png", + wield_image = "default_ladder_wood.png^carts_rail_straight.png^cottages_rope.png", paramtype = "light", paramtype2 = "wallmounted", sunlight_propagates = true, @@ -54,7 +54,8 @@ minetest.register_node("cottages:ladder_with_rope_and_rail", { selection_box = { type = "wallmounted", }, - groups = {choppy=2,oddly_breakable_by_hand=3,rail=1,connect_to_raillike=1}, --connect_to_raillike=minetest.raillike_group("rail")}, +-- groups = {choppy=2,oddly_breakable_by_hand=3,rail=1,connect_to_raillike=1}, --connect_to_raillike=minetest.raillike_group("rail")}, + groups = {choppy=2,oddly_breakable_by_hand=3,rail=1,connect_to_raillike=minetest.raillike_group("rail")}, legacy_wallmounted = true, sounds = default.node_sound_wood_defaults, }) diff --git a/nodes_roof.lua b/nodes_roof.lua index 27d5aea..5b5eb79 100644 --- a/nodes_roof.lua +++ b/nodes_roof.lua @@ -199,17 +199,49 @@ minetest.register_node("cottages:slate_vertical", { minetest.register_craft({ - output = "cottages:slate_vertical", + output = "cottages:slate_vertical 2", recipe = { {cottages.craftitem_stone, cottages.craftitem_wood, '' } } }); + + +if stairs and stairs.mod and stairs.mod == "redo" then + + stairs.register_all("slate_vertical", "cottages:slate_vertical", + {cracky = 2, stone = 1}, + {"cottages_slate.png"}, + S("Slate stair"), + S("Slate slab"), + default.node_sound_dirt_defaults()) + +elseif minetest.global_exists("stairsplus") then + + stairsplus:register_all("cottages", "slate_vertical", "cottages:slate_vertical", { + description = S("Slate"), + tiles = {"cottages_slate.png"}, + groups = {cracky = 2, stone = 1}, + sounds = default.node_sound_dirt_defaults(), + }) + +else + + stairs.register_stair_and_slab("slate_vertical", "cottages:slate_vertical", + {cracky = 2, stone = 1}, + {"cottages_slate.png"}, + S("Slate stair"), + S("Slate slab"), + default.node_sound_dirt_defaults()) + + +end + --------------------------------------------------------------------------------------- -- Reed might also be needed as a full block --------------------------------------------------------------------------------------- minetest.register_node("cottages:reet", { - description = S("Reet for thatching"), - tiles = {"cottages_reet.png"}, + description = S("Reet for thatching"), + tiles = {"cottages_reet.png"}, groups = {snappy=3,choppy=3,oddly_breakable_by_hand=3,flammable=3}, sounds = default.node_sound_wood_defaults, is_ground_content = false, @@ -218,7 +250,39 @@ minetest.register_node("cottages:reet", { minetest.register_craft({ output = "cottages:reet", - recipe = { {cottages.craftitem_papyrus,cottages.craftitem_papyrus}, - {cottages.craftitem_papyrus,cottages.craftitem_papyrus}, + recipe = { {cottages.craftitem_papyrus, cottages.craftitem_papyrus}, + {cottages.craftitem_papyrus, cottages.craftitem_papyrus}, }, }) + + + +if stairs and stairs.mod and stairs.mod == "redo" then + + stairs.register_all("reet", "cottages:reet", + {snappy = 3, choppy = 3, oddly_breakable_by_hand = 3, flammable = 3}, + {"cottages_reet.png"}, + S("Reet stair"), + S("Reet slab"), + default.node_sound_wood_defaults()) + +elseif minetest.global_exists("stairsplus") then + + stairsplus:register_all("cottages", "reet", "cottages:reet", { + description = S("Reet"), + tiles = {"cottages_reet.png"}, + groups = {snappy = 3, choppy = 3, oddly_breakable_by_hand = 3, flammable = 3}, + sounds = default.node_sound_wood_defaults(), + }) + +else + + stairs.register_stair_and_slab("reet", "cottages:reet", + {snappy = 3, choppy = 3, oddly_breakable_by_hand = 3, flammable = 3}, + {"cottages_reet.png"}, + S("Reet stair"), + S("Reet slab"), + default.node_sound_wood_defaults()) + + +end \ No newline at end of file -- cgit v1.2.3