diff options
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | nodes_roof.lua | 85 | ||||
-rw-r--r-- | nodes_straw.lua | 73 |
3 files changed, 84 insertions, 79 deletions
@@ -80,6 +80,11 @@ Bas080 (CC; see https://forum.minetest.net/viewtopic.php?t=2344) Derived from Universal schema.jpg by Stefanie Lindener, which can be found here: http://de.wikipedia.org/w/index.php?title=Datei:Universal_schema.jpg&filetimestamp=20060510110309& The texture is CC-by-sa 2.0/de. cottages_slate.png + +v-rob + Shingle texture (cottages_homedecor_shingles_misc_wood.png), + better wheel (cottages_wagonwheel.png) texture, + wooden barrel texture (cottages_barrel_storage.png). Textures not provided but used (need to be supplied by a default mod): default_wood.png diff --git a/nodes_roof.lua b/nodes_roof.lua index f865b6d..01eac78 100644 --- a/nodes_roof.lua +++ b/nodes_roof.lua @@ -18,7 +18,7 @@ cottages.register_roof = function( name, tiles, basic_material, homedecor_altern tiles = tiles, paramtype = "light", paramtype2 = "facedir", - groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}, + groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, roof = 1}, node_box = { type = "fixed", fixed = { @@ -44,7 +44,7 @@ cottages.register_roof = function( name, tiles, basic_material, homedecor_altern tiles = tiles, paramtype = "light", paramtype2 = "facedir", - groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}, + groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, roof = 1}, node_box = { type = "fixed", fixed = { @@ -71,7 +71,7 @@ cottages.register_roof = function( name, tiles, basic_material, homedecor_altern tiles = { tiles[1], tiles[2], tiles[1], tiles[1], tiles[1], tiles[1] }; paramtype = "light", paramtype2 = "facedir", - groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}, + groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, roof = 1}, node_box = { type = "fixed", fixed = { @@ -201,18 +201,17 @@ minetest.register_node("cottages:slate_vertical", { "cottages_slate.png", "cottages_slate.png", cottages.texture_roof_sides, "cottages_slate.png"}, paramtype2 = "facedir", - groups = {cracky=2, stone=1}, + groups = {cracky = 2, roof = 1}, sounds = default.node_sound_stone_defaults, is_ground_content = false, }) minetest.register_craft({ - output = "cottages:slate_vertical 2", - recipe = { {cottages.craftitem_stone, cottages.craftitem_wood, '' } - } + output = "cottages:slate_vertical 2", + recipe = {{ cottages.craftitem_stone, cottages.craftitem_wood, '' }} }); -cottages.derive_blocks( "cottages", "slate_vertical", "Slate", "cottages_slate.png", {cracky = 2, stone = 1} ) +cottages.derive_blocks( "cottages", "slate_vertical", "Slate", "cottages_slate.png", {cracky = 2, roof = 1} ) --------------------------------------------------------------------------------------- @@ -224,18 +223,17 @@ minetest.register_node("cottages:roof_vertical_asphalt", { "cottages_homedecor_shingles_asphalt.png", "cottages_homedecor_shingles_asphalt.png", cottages.texture_roof_sides, "cottages_homedecor_shingles_asphalt.png"}, paramtype2 = "facedir", - groups = {cracky=2, stone=1}, + groups = {cracky = 2, roof = 1}, sounds = default.node_sound_stone_defaults, is_ground_content = false, }) minetest.register_craft({ - output = "cottages:roof_vertical_asphalt 3", - recipe = { {cottages.craftitem_stone, cottages.craftitem_wood, cottages.craftitem_coal_lump } - } + output = "cottages:roof_vertical_asphalt 3", + recipe = {{ cottages.craftitem_stone, cottages.craftitem_wood, cottages.craftitem_coal_lump }} }); -cottages.derive_blocks( "cottages", "roof_vertical_asphalt", "Asphalt", "cottages_homedecor_shingles_asphalt.png", {cracky = 2, stone = 1} ) +cottages.derive_blocks( "cottages", "roof_vertical_asphalt", "Asphalt", "cottages_homedecor_shingles_asphalt.png", {cracky = 2, roof = 1} ) @@ -248,18 +246,17 @@ minetest.register_node("cottages:roof_vertical_terracotta", { "cottages_homedecor_shingles_terracotta.png", "cottages_homedecor_shingles_terracotta.png", cottages.texture_roof_sides, "cottages_homedecor_shingles_terracotta.png"}, paramtype2 = "facedir", - groups = {cracky=2, stone=1}, + groups = {cracky = 2, roof = 1}, sounds = default.node_sound_stone_defaults, is_ground_content = false, }) minetest.register_craft({ - output = "cottages:roof_vertical_terracotta 3", - recipe = { {cottages.craftitem_stone, cottages.craftitem_wood, cottages.craftitem_clay_brick } - } + output = "cottages:roof_vertical_terracotta 3", + recipe = {{ cottages.craftitem_stone, cottages.craftitem_wood, cottages.craftitem_clay_brick }} }); -cottages.derive_blocks( "cottages", "roof_vertical_terracotta", "Terracotta", "cottages_homedecor_shingles_terracotta.png", {cracky = 2, stone = 1} ) +cottages.derive_blocks( "cottages", "roof_vertical_terracotta", "Terracotta", "cottages_homedecor_shingles_terracotta.png", {cracky = 2, roof = 1} ) @@ -272,18 +269,17 @@ minetest.register_node("cottages:roof_vertical_wood", { cottages.textures_roof_wood, cottages.textures_roof_wood, cottages.texture_roof_sides, cottages.textures_roof_wood}, paramtype2 = "facedir", - groups = {cracky=2, stone=1}, + groups = {cracky = 2, roof = 1}, sounds = default.node_sound_stone_defaults, is_ground_content = false, }) minetest.register_craft({ - output = "cottages:roof_vertical_wood 3", - recipe = { {cottages.craftitem_stone, cottages.craftitem_wood, "default:tree" } - } + output = "cottages:roof_vertical_wood 3", + recipe = {{ cottages.craftitem_stone, cottages.craftitem_wood, "default:tree" }} }); -cottages.derive_blocks( "cottages", "roof_vertical_wood", "Wooden", cottages.textures_roof_wood, {cracky = 2, stone = 1} ) +cottages.derive_blocks( "cottages", "roof_vertical_wood", "Wooden", cottages.textures_roof_wood, {cracky = 2, roof = 1} ) @@ -291,23 +287,22 @@ cottages.derive_blocks( "cottages", "roof_vertical_wood", "Wooden", cottages.tex -- brown shingles roof: sawable block --------------------------------------------------------------------------------------- minetest.register_node("cottages:roof_vertical_brown", { - description = S("Vertical shingle roof"), + description = S("Vertical brown shingle roof"), tiles = {"cottages_homedecor_shingles_wood.png", cottages.texture_roof_sides, "cottages_homedecor_shingles_wood.png", "cottages_homedecor_shingles_wood.png", cottages.texture_roof_sides, "cottages_homedecor_shingles_wood.png"}, paramtype2 = "facedir", - groups = {cracky=2, stone=1}, + groups = {cracky = 2, roof = 1}, sounds = default.node_sound_stone_defaults, is_ground_content = false, }) minetest.register_craft({ - output = "cottages:roof_vertical_brown 3", - recipe = { {cottages.craftitem_stone, cottages.craftitem_wood, cottages.craftitem_dirt } - } + output = "cottages:roof_vertical_brown 3", + recipe = {{ cottages.craftitem_stone, cottages.craftitem_wood, cottages.craftitem_dirt }} }); -cottages.derive_blocks( "cottages", "roof_vertical_brown", "Shingles", "cottages_homedecor_shingles_wood.png", {cracky = 2, stone = 1} ) +cottages.derive_blocks( "cottages", "roof_vertical_brown", "Brown shingle", "cottages_homedecor_shingles_wood.png", {cracky = 2, roof = 1} ) @@ -315,24 +310,29 @@ cottages.derive_blocks( "cottages", "roof_vertical_brown", "Shingles", "cottages -- assorted shingles roof: sawable block --------------------------------------------------------------------------------------- minetest.register_node("cottages:roof_vertical_shingle", { - description = S("Vertical misc shingle roof"), + description = S("Vertical shingle roof"), tiles = {"cottages_homedecor_shingles_misc_wood.png", cottages.texture_roof_sides, "cottages_homedecor_shingles_misc_wood.png", "cottages_homedecor_shingles_misc_wood.png", cottages.texture_roof_sides, "cottages_homedecor_shingles_misc_wood.png"}, paramtype2 = "facedir", - groups = {cracky=2, stone=1}, + groups = {cracky = 2, roof = 1}, sounds = default.node_sound_stone_defaults, is_ground_content = false, }) +-- minetest.register_craft({ +-- output = "cottages:roof_vertical_shingle", +-- recipe = { {"cottages:wood_flat", "cottages:wood_flat"}, +-- {"cottages:wood_flat", "cottages:wood_flat"}, +-- }, +-- }) + minetest.register_craft({ - output = "cottages:roof_vertical_shingle", - recipe = { {"cottages:wood_flat", "cottages:wood_flat"}, - {"cottages:wood_flat", "cottages:wood_flat"}, - }, -}) + output = "cottages:roof_vertical_shingle 2", + recipe = {{ cottages.craftitem_wood, "cottages:wood_flat" }} +}); -cottages.derive_blocks( "cottages", "roof_vertical_shingle", "Misc shingles", "cottages_homedecor_shingles_misc_wood.png", {cracky = 2, stone = 1} ) +cottages.derive_blocks( "cottages", "roof_vertical_shingle", "Shingle", "cottages_homedecor_shingles_misc_wood.png", {cracky = 2, roof = 1} ) --------------------------------------------------------------------------------------- @@ -341,16 +341,17 @@ cottages.derive_blocks( "cottages", "roof_vertical_shingle", "Misc shingles", "c minetest.register_node("cottages:reet", { description = S("Reet for thatching"), tiles = {"cottages_reet.png"}, - groups = {snappy=3,choppy=3,oddly_breakable_by_hand=3,flammable=3}, + groups = {snappy = 3, choppy = 3, oddly_breakable_by_hand = 3, flammable = 3, roof = 1}, sounds = default.node_sound_wood_defaults, is_ground_content = false, }) minetest.register_craft({ - output = "cottages:reet", - recipe = { {cottages.craftitem_papyrus, cottages.craftitem_papyrus}, - {cottages.craftitem_papyrus, cottages.craftitem_papyrus}, + output = "cottages:reet", + recipe = { + { cottages.craftitem_papyrus, cottages.craftitem_papyrus }, + { cottages.craftitem_papyrus, cottages.craftitem_papyrus }, }, }) -cottages.derive_blocks( "cottages", "reet", "Reet", "cottages_reet.png", {snappy = 3, choppy = 3, oddly_breakable_by_hand = 3, flammable = 3} ) +cottages.derive_blocks( "cottages", "reet", "Reet", "cottages_reet.png", {snappy = 3, choppy = 3, oddly_breakable_by_hand = 3, flammable = 3, roof = 1} ) diff --git a/nodes_straw.lua b/nodes_straw.lua index 9d9a8e3..b861849 100644 --- a/nodes_straw.lua +++ b/nodes_straw.lua @@ -22,17 +22,17 @@ end -- an even simpler from of bed - usually for animals -- it is a nodebox and not wallmounted because that makes it easier to replace beds with straw mats minetest.register_node("cottages:straw_mat", { - description = S("Layer of straw"), - drawtype = 'nodebox', - tiles = { 'cottages_darkage_straw.png' }, -- done by VanessaE - wield_image = 'cottages_darkage_straw.png', - inventory_image = 'cottages_darkage_straw.png', - sunlight_propagates = true, - paramtype = 'light', - paramtype2 = "facedir", - walkable = false, - groups = { snappy = 3 }, - sounds = default.node_sound_leaves_defaults, + description = S("Layer of straw"), + drawtype = 'nodebox', + tiles = { 'cottages_darkage_straw.png' }, -- done by VanessaE + wield_image = 'cottages_darkage_straw.png', + inventory_image = 'cottages_darkage_straw.png', + sunlight_propagates = true, + paramtype = 'light', + paramtype2 = "facedir", + walkable = false, + groups = { snappy = 3 }, + sounds = default.node_sound_leaves_defaults, node_box = { type = "fixed", fixed = { @@ -57,9 +57,9 @@ minetest.register_node("cottages:straw_bale", { description = S("Straw bale"), tiles = {"cottages_darkage_straw_bale.png"}, paramtype = "light", - groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3}, + groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, sounds = default.node_sound_wood_defaults, - -- the bale is slightly smaller than a full node + -- the bale is slightly smaller than a full node node_box = { type = "fixed", fixed = { @@ -80,9 +80,9 @@ minetest.register_node("cottages:straw", { drawtype = "normal", description = S("Straw block"), tiles = {"cottages_darkage_straw.png"}, - groups = {snappy=3,choppy=3,oddly_breakable_by_hand=3,flammable=3}, + groups = {snappy = 3, choppy = 3, oddly_breakable_by_hand = 3, flammable = 3, roof = 1}, sounds = default.node_sound_wood_defaults, - -- the bale is slightly smaller than a full node + -- the bale is slightly smaller than a full node is_ground_content = false, }) @@ -108,8 +108,8 @@ minetest.register_node("cottages:threshing_floor", { -- TODO: stone also looks pretty well for this tiles = {"cottages_junglewood.png^farming_wheat.png","cottages_junglewood.png","cottages_junglewood.png^"..cottages.texture_stick}, paramtype = "light", - paramtype2 = "facedir", - groups = {cracky=2}, + paramtype2 = "facedir", + groups = {cracky = 2}, is_ground_content = false, node_box = { type = "fixed", @@ -130,14 +130,14 @@ minetest.register_node("cottages:threshing_floor", { } }, on_construct = function(pos) - local meta = minetest.get_meta(pos); - meta:set_string("infotext", S("Threshing floor")); - local inv = meta:get_inventory(); - inv:set_size("harvest", 2); - inv:set_size("straw", 4); - inv:set_size("seeds", 4); - meta:set_string("formspec", cottages_formspec_treshing_floor ); - end, + local meta = minetest.get_meta(pos); + meta:set_string("infotext", S("Threshing floor")); + local inv = meta:get_inventory(); + inv:set_size("harvest", 2); + inv:set_size("straw", 4); + inv:set_size("seeds", 4); + meta:set_string("formspec", cottages_formspec_treshing_floor ); + end, after_place_node = function(pos, placer) local meta = minetest.get_meta(pos); @@ -150,19 +150,18 @@ minetest.register_node("cottages:threshing_floor", { can_dig = function(pos,player) - local meta = minetest.get_meta(pos); - local inv = meta:get_inventory(); + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory(); local owner = meta:get_string('owner'); - if( not( inv:is_empty("harvest")) - or not( inv:is_empty("straw")) - or not( inv:is_empty("seeds")) - or not( player ) - or ( owner and owner ~= '' and player:get_player_name() ~= owner )) then - - return false; + if( not( inv:is_empty("harvest")) + or not( inv:is_empty("straw")) + or not( inv:is_empty("seeds")) + or not( player ) + or ( owner and owner ~= '' and player:get_player_name() ~= owner )) then + return false; end - return true; + return true; end, allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) @@ -364,7 +363,7 @@ minetest.register_node("cottages:handmill", { tiles = {"cottages_stone.png"}, paramtype = "light", paramtype2 = "facedir", - groups = {cracky=2}, + groups = {cracky = 2}, is_ground_content = false, selection_box = { type = "fixed", @@ -600,5 +599,5 @@ cottages.derive_blocks( "cottages", "straw", "Straw block", "cottages_darkage_straw.png", - {snappy = 3, choppy = 3, oddly_breakable_by_hand = 3, flammable = 3} ) + {snappy = 3, choppy = 3, oddly_breakable_by_hand = 3, flammable = 3, roof = 1} ) |