From da652c16cde27a6f0e9af6e71de4fc411ccabd33 Mon Sep 17 00:00:00 2001 From: Richard Qian Date: Mon, 5 Dec 2016 15:56:48 -0600 Subject: [PATCH] Even more node and craft changes - Enable many nodes to be rotated by the screwdriver - Reduce redundancy of the the wood tiles; use the screwdriver to achieve them - Add extra crafts dealing with empty shelves - Get rid of snappiness in all blocks; it's only useful for plants - Loop between stone tile, its variants, and cobblestone --- aliases.lua | 4 +++ crafting.lua | 63 ++++++++++++++++++--------------- nodes.lua | 98 +++++++++++++++++++++------------------------------- 3 files changed, 79 insertions(+), 86 deletions(-) diff --git a/aliases.lua b/aliases.lua index b9b2106..f079b62 100644 --- a/aliases.lua +++ b/aliases.lua @@ -56,6 +56,10 @@ 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") +minetest.register_alias("moreblocks:wood_tile_flipped","moreblocks:wood_tile") +minetest.register_alias("moreblocks:wood_tile_down","moreblocks:wood_tile_up") +minetest.register_alias("moreblocks:wood_tile_left","moreblocks:wood_up") +minetest.register_alias("moreblocks:wood_tile_right","moreblocks:wood_up") -- ABM for horizontal trees (fix facedir): local horizontal_tree_convert_facedir = {7, 12, 9, 18} diff --git a/crafting.lua b/crafting.lua index 622ff12..e097b66 100644 --- a/crafting.lua +++ b/crafting.lua @@ -44,11 +44,6 @@ minetest.register_craft({ } }) -minetest.register_craft({ - output = "moreblocks:wood_tile_flipped", - recipe = {{"moreblocks:wood_tile"},} -}) - minetest.register_craft({ output = "moreblocks:wood_tile_center 9", recipe = { @@ -74,28 +69,6 @@ minetest.register_craft({ } }) -minetest.register_craft({ - output = "moreblocks:wood_tile_down", - recipe = { - {"moreblocks:wood_tile_center"}, - {"default:stick"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:wood_tile_left", - recipe = { - {"default:stick", "moreblocks:wood_tile_center"}, - } -}) - -minetest.register_craft({ - output = "moreblocks:wood_tile_right", - recipe = { - {"moreblocks:wood_tile_center", "default:stick"}, - } -}) - minetest.register_craft({ output = "moreblocks:circle_stone_bricks 8", recipe = { @@ -180,6 +153,14 @@ minetest.register_craft({ } }) +-- When approaching the below craft, loop back to the stone tile +minetest.register_craft({ + output = "moreblocks:stone_tile", + recipe = { + {"moreblocks:split_stone_tile_alt"}, + } +}) + minetest.register_craft({ output = "moreblocks:grey_bricks 2", type = "shapeless", @@ -200,6 +181,34 @@ minetest.register_craft({ -- When obtaining an empty bookshelf, return the books used in it as well }) +minetest.register_craft({ + output = "moreblocks:empty_bookshelf", + type = "shapeless", + recipe = {"moreblocks:sweeper", "vessels:shelf"}, + replacements = {{"vessels:shelf", "vessels:glass_fragments 4"}}, +}) + +minetest.register_craft({ + type = "shapeless", + output = "default:bookshelf", + recipe = {"moreblocks:empty_bookshelf", "default:book", "default:book", "default:book"}, +}) + +minetest.register_craft({ + type = "shapeless", + output = "vessels:shelf", + recipe = {"moreblocks:empty_bookshelf", "group:vessel", "group:vessel", "group:vessel"}, +}) + +minetest.register_craft({ + output = "moreblocks:empty_bookshelf", + recipe = { + {"group:wood", "group:wood", "group:wood"}, + {"", "", ""}, + {"group:wood", "group:wood", "group:wood"}, + } +}) + minetest.register_craft({ output = "moreblocks:coal_stone_bricks 4", recipe = { diff --git a/nodes.lua b/nodes.lua index 7d18f37..b62cff3 100644 --- a/nodes.lua +++ b/nodes.lua @@ -24,8 +24,10 @@ end local nodes = { ["wood_tile"] = { description = S("Wooden Tile"), - groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, is_ground_content = false, + paramtype2 = "facedir", + place_param2 = 0, tiles = {"default_wood.png^moreblocks_wood_tile.png", "default_wood.png^moreblocks_wood_tile.png", "default_wood.png^moreblocks_wood_tile.png", @@ -34,65 +36,30 @@ local nodes = { "default_wood.png^moreblocks_wood_tile.png^[transformR90"}, sounds = sound_wood, }, - ["wood_tile_flipped"] = { - description = S("Wooden Tile"), - groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, - is_ground_content = false, - tiles = {"default_wood.png^moreblocks_wood_tile.png^[transformR90", - "default_wood.png^moreblocks_wood_tile.png^[transformR90", - "default_wood.png^moreblocks_wood_tile.png^[transformR90", - "default_wood.png^moreblocks_wood_tile.png^[transformR90", - "default_wood.png^moreblocks_wood_tile.png^[transformR180", - "default_wood.png^moreblocks_wood_tile.png^[transformR180"}, - sounds = sound_wood, - no_stairs = true, - }, ["wood_tile_center"] = { description = S("Centered Wooden Tile"), - groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, is_ground_content = false, tiles = {"default_wood.png^moreblocks_wood_tile_center.png"}, sounds = sound_wood, }, ["wood_tile_full"] = { description = S("Full Wooden Tile"), - groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, is_ground_content = false, tiles = tile_tiles("wood_tile_full"), sounds = sound_wood, }, ["wood_tile_up"] = { description = S("Upwards Wooden Tile"), - groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, + paramtype2 = "facedir", + place_param2 = 0, + groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, is_ground_content = false, tiles = {"default_wood.png^moreblocks_wood_tile_up.png"}, sounds = sound_wood, no_stairs = true, }, - ["wood_tile_down"] = { - description = S("Downwards Wooden Tile"), - groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, - is_ground_content = false, - tiles = {"default_wood.png^[transformR180^moreblocks_wood_tile_up.png^[transformR180"}, - sounds = sound_wood, - no_stairs = true, - }, - ["wood_tile_left"] = { - description = S("Leftwards Wooden Tile"), - groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, - is_ground_content = false, - tiles = {"default_wood.png^[transformR270^moreblocks_wood_tile_up.png^[transformR270"}, - sounds = sound_wood, - no_stairs = true, - }, - ["wood_tile_right"] = { - description = S("Rightwards Wooden Tile"), - groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, - is_ground_content = false, - tiles = {"default_wood.png^[transformR90^moreblocks_wood_tile_up.png^[transformR90"}, - sounds = sound_wood, - no_stairs = true, - }, ["circle_stone_bricks"] = { description = S("Circle Stone Bricks"), groups = {stone = 1, cracky = 3}, @@ -101,18 +68,24 @@ local nodes = { }, ["grey_bricks"] = { description = S("Stone Bricks"), + paramtype2 = "facedir", + place_param2 = 0, groups = {cracky = 3}, is_ground_content = false, sounds = sound_stone, }, ["coal_stone_bricks"] = { description = S("Coal Stone Bricks"), + paramtype2 = "facedir", + place_param2 = 0, groups = {stone = 1, cracky = 3}, is_ground_content = false, sounds = sound_stone, }, ["iron_stone_bricks"] = { description = S("Iron Stone Bricks"), + paramtype2 = "facedir", + place_param2 = 0, groups = {stone = 1, cracky = 3}, is_ground_content = false, sounds = sound_stone, @@ -125,6 +98,8 @@ local nodes = { }, ["split_stone_tile"] = { description = S("Split Stone Tile"), + paramtype2 = "facedir", + place_param2 = 0, tiles = {"moreblocks_split_stone_tile_top.png", "moreblocks_split_stone_tile.png"}, groups = {stone = 1, cracky = 3}, @@ -151,6 +126,8 @@ local nodes = { }, ["plankstone"] = { description = S("Plankstone"), + paramtype2 = "facedir", + place_param2 = 0, groups = {cracky = 3}, is_ground_content = false, tiles = tile_tiles("plankstone"), @@ -164,7 +141,7 @@ local nodes = { paramtype = "light", sunlight_propagates = true, is_ground_content = false, - groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, sounds = sound_glass, }, ["coal_glass"] = { @@ -175,7 +152,7 @@ local nodes = { paramtype = "light", sunlight_propagates = true, is_ground_content = false, - groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, sounds = sound_glass, }, ["clean_glass"] = { @@ -186,11 +163,13 @@ local nodes = { paramtype = "light", sunlight_propagates = true, is_ground_content = false, - groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, sounds = sound_glass, }, ["cactus_brick"] = { description = S("Cactus Brick"), + paramtype2 = "facedir", + place_param2 = 0, groups = {cracky = 3}, is_ground_content = false, sounds = sound_stone, @@ -209,9 +188,10 @@ local nodes = { }, ["empty_bookshelf"] = { description = S("Empty Bookshelf"), - tiles = {"default_wood.png", "default_wood.png", - "moreblocks_empty_bookshelf.png"}, - groups = {snappy = 2, choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + paramtype2 = "facedir", + tiles = {"default_wood.png", "default_wood.png", "default_wood.png", + "default_wood.png", "moreblocks_empty_bookshelf.png", "moreblocks_empty_bookshelf.png"}, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, is_ground_content = false, sounds = sound_wood, furnace_burntime = 15, @@ -270,42 +250,42 @@ local nodes = { sunlight_propagates = true, is_ground_content = false, walkable = false, - groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, sounds = sound_glass, no_stairs = true, }, ["all_faces_tree"] = { description = S("All-faces Tree"), tiles = {"default_tree_top.png"}, - groups = {tree = 1,snappy = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, sounds = sound_wood, furnace_burntime = 30, }, ["all_faces_jungle_tree"] = { description = S("All-faces Jungle Tree"), tiles = {"default_jungletree_top.png"}, - groups = {tree = 1,snappy = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, sounds = sound_wood, furnace_burntime = 38, }, ["all_faces_pine_tree"] = { description = S("All-faces Pine Tree"), tiles = {"default_pine_tree_top.png"}, - groups = {tree = 1,snappy = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3}, sounds = sound_wood, furnace_burntime = 26, }, ["all_faces_acacia_tree"] = { description = S("All-faces Acacia Tree"), tiles = {"default_acacia_tree_top.png"}, - groups = {tree = 1,snappy = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, sounds = sound_wood, furnace_burntime = 34, }, ["all_faces_aspen_tree"] = { description = S("All-faces Aspen Tree"), tiles = {"default_aspen_tree_top.png"}, - groups = {tree = 1,snappy = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3}, sounds = sound_wood, furnace_burntime = 22, }, @@ -318,7 +298,7 @@ local nodes = { sunlight_propagates = true, is_ground_content = false, light_source = 11, - groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, sounds = sound_glass, }, ["trap_glow_glass"] = { @@ -331,7 +311,7 @@ local nodes = { is_ground_content = false, light_source = 11, walkable = false, - groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, sounds = sound_glass, no_stairs = true, }, @@ -343,8 +323,8 @@ local nodes = { paramtype = "light", sunlight_propagates = true, is_ground_content = false, - light_source = 14, - groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, + light_source = default.LIGHT_MAX, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, sounds = sound_glass, }, ["trap_super_glow_glass"] = { @@ -355,9 +335,9 @@ local nodes = { paramtype = "light", sunlight_propagates = true, is_ground_content = false, - light_source = 14, + light_source = default.LIGHT_MAX, walkable = false, - groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, sounds = sound_glass, no_stairs = true, },