From 335d9a3eddcb590c3ca5de9cba9b152e5e560af1 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Tue, 13 Feb 2018 14:05:34 -0500 Subject: removed boost_cart and carbone_mobs -- too many crashes updated blox, homedecor, plantlifed, cottages, farming_redo, framedglass, gloopblocks, mesecons, moreblocks, moretrees, pipeworks, player_textures, replacer, signs_lib, stained_glass, technic, travelnet, unified_inventory, unifieddyes, and worldedit. --- moreblocks/nodes.lua | 273 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 197 insertions(+), 76 deletions(-) (limited to 'moreblocks/nodes.lua') diff --git a/moreblocks/nodes.lua b/moreblocks/nodes.lua index 28e2ef1..efa1f94 100644 --- a/moreblocks/nodes.lua +++ b/moreblocks/nodes.lua @@ -7,6 +7,7 @@ Licensed under the zlib license. See LICENSE.md for more information. local S = moreblocks.intllib +local sound_dirt = default.node_sound_dirt_defaults() local sound_wood = default.node_sound_wood_defaults() local sound_stone = default.node_sound_stone_defaults() local sound_glass = default.node_sound_glass_defaults() @@ -21,10 +22,27 @@ local function tile_tiles(name) return {tex, tex, tex, tex, tex.. "^[transformR90", tex.. "^[transformR90"} end +local function wood_tile_replace(itemstack, placer, pointed_thing) + local substack + if itemstack:get_name() == "moreblocks:wood_tile_flipped" then + substack = ItemStack("moreblocks:wood_tile") + else -- right, left, and down variants + substack = ItemStack("moreblocks:wood_tile_offset") + end + local _, success = minetest.item_place(substack, placer, pointed_thing) + if success then + itemstack:take_item() + end + return itemstack +end + local nodes = { ["wood_tile"] = { description = S("Wooden Tile"), - groups = {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, + 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,148 +52,179 @@ local nodes = { sounds = sound_wood, }, ["wood_tile_flipped"] = { - description = S("Wooden Tile"), - groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, + description = S("Wooden Tile (Deprecated)"), 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, + on_place = wood_tile_replace }, ["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}, - tiles = {"default_wood.png^moreblocks_wood_tile_up.png"}, + ["wood_tile_offset"] = { + description = S("Offset Wooden Tile"), + 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_offset.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}, - tiles = {"default_wood.png^[transformR180^moreblocks_wood_tile_up.png^[transformR180"}, - sounds = sound_wood, + description = S("Downwards Wooden Tile (Deprecated)"), + tiles = {"default_wood.png^[transformR180^moreblocks_wood_tile_offset.png^[transformR180"}, no_stairs = true, + on_place = wood_tile_replace }, ["wood_tile_left"] = { - description = S("Leftwards Wooden Tile"), - groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, - tiles = {"default_wood.png^[transformR270^moreblocks_wood_tile_up.png^[transformR270"}, - sounds = sound_wood, + description = S("Leftwards Wooden Tile (Deprecated)"), + tiles = {"default_wood.png^[transformR270^moreblocks_wood_tile_offset.png^[transformR270"}, no_stairs = true, + on_place = wood_tile_replace }, ["wood_tile_right"] = { - description = S("Rightwards Wooden Tile"), - groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3}, - tiles = {"default_wood.png^[transformR90^moreblocks_wood_tile_up.png^[transformR90"}, - sounds = sound_wood, + description = S("Rightwards Wooden Tile (Deprecated)"), + tiles = {"default_wood.png^[transformR90^moreblocks_wood_tile_offset.png^[transformR90"}, no_stairs = true, + on_place = wood_tile_replace }, ["circle_stone_bricks"] = { description = S("Circle Stone Bricks"), - groups = {cracky = 3}, + groups = {stone = 1, cracky = 3}, + is_ground_content = false, sounds = sound_stone, }, ["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"), - groups = {cracky = 3}, + 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"), - groups = {cracky = 3}, + paramtype2 = "facedir", + place_param2 = 0, + groups = {stone = 1, cracky = 3}, + is_ground_content = false, sounds = sound_stone, }, ["stone_tile"] = { description = S("Stone Tile"), - groups = {cracky = 3}, + groups = {stone = 1, cracky = 3}, + is_ground_content = false, sounds = sound_stone, }, ["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 = {cracky = 3}, + groups = {stone = 1, cracky = 3}, + is_ground_content = false, sounds = sound_stone, }, - ["split_stone_tile_alt"] = { - description = S("Checkered Stone Tile"), - groups = {cracky = 3}, + ["checker_stone_tile"] = { + description = S("Checker Stone Tile"), + groups = {stone = 1, cracky = 3}, + is_ground_content = false, sounds = sound_stone, }, ["tar"] = { description = S("Tar"), - groups = {cracky = 2, tar_block = 1}, + groups = {cracky=2, tar_block=1}, + is_ground_content = false, sounds = sound_stone, }, + ["dirt_compressed"] = { + description = S("Compressed Dirt"), + groups = {crumbly=2}, + is_ground_content = false, + sounds = sound_dirt, + }, ["cobble_compressed"] = { description = S("Compressed Cobblestone"), groups = {cracky = 1}, + is_ground_content = false, sounds = sound_stone, }, ["plankstone"] = { description = S("Plankstone"), + paramtype2 = "facedir", + place_param2 = 0, groups = {cracky = 3}, + is_ground_content = false, tiles = tile_tiles("plankstone"), sounds = sound_stone, }, ["iron_glass"] = { description = S("Iron Glass"), drawtype = "glasslike_framed_optional", - --tiles = {"moreblocks_iron_glass.png", "moreblocks_iron_glass_detail.png"}, - tiles = {"moreblocks_iron_glass.png"}, + tiles = {"default_glass.png^[colorize:#DEDEDE", "default_glass_detail.png^[colorize:#DEDEDE"}, paramtype = "light", sunlight_propagates = true, - groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, + is_ground_content = false, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, sounds = sound_glass, }, ["coal_glass"] = { description = S("Coal Glass"), drawtype = "glasslike_framed_optional", - --tiles = {"moreblocks_coal_glass.png", "moreblocks_coal_glass_detail.png"}, - tiles = {"moreblocks_coal_glass.png"}, + tiles = {"default_glass.png^[colorize:#828282", "default_glass_detail.png^[colorize:#828282"}, paramtype = "light", sunlight_propagates = true, - groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, + is_ground_content = false, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, sounds = sound_glass, }, ["clean_glass"] = { description = S("Clean Glass"), drawtype = "glasslike_framed_optional", - --tiles = {"moreblocks_clean_glass.png", "moreblocks_clean_glass_detail.png"}, - tiles = {"moreblocks_clean_glass.png"}, + tiles = {"moreblocks_clean_glass.png", "moreblocks_clean_glass_detail.png"}, paramtype = "light", sunlight_propagates = true, - groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, + is_ground_content = false, + 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, }, ["cactus_checker"] = { description = S("Cactus Checker"), - groups = {cracky = 3}, + groups = {stone = 1, cracky = 3}, + is_ground_content = false, tiles = {"default_stone.png^moreblocks_cactus_checker.png", "default_stone.png^moreblocks_cactus_checker.png", "default_stone.png^moreblocks_cactus_checker.png", @@ -184,23 +233,27 @@ local nodes = { "default_stone.png^moreblocks_cactus_checker.png^[transformR90"}, sounds = sound_stone, }, - ["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}, + ["empty_shelf"] = { + description = S("Empty Shelf"), + paramtype2 = "facedir", + tiles = {"default_wood.png", "default_wood.png", "default_wood.png", + "default_wood.png", "moreblocks_empty_shelf.png", "moreblocks_empty_shelf.png"}, + groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3}, + is_ground_content = false, sounds = sound_wood, furnace_burntime = 15, no_stairs = true, }, ["coal_stone"] = { description = S("Coal Stone"), - groups = {cracky = 3}, + groups = {stone = 1, cracky = 3}, + is_ground_content = false, sounds = sound_stone, }, ["iron_stone"] = { description = S("Iron Stone"), - groups = {cracky = 3}, + groups = {stone = 1, cracky = 3}, + is_ground_content = false, sounds = sound_stone, }, ["coal_checker"] = { @@ -211,7 +264,8 @@ local nodes = { "default_stone.png^moreblocks_coal_checker.png", "default_stone.png^moreblocks_coal_checker.png^[transformR90", "default_stone.png^moreblocks_coal_checker.png^[transformR90"}, - groups = {cracky = 3}, + groups = {stone = 1, cracky = 3}, + is_ground_content = false, sounds = sound_stone, }, ["iron_checker"] = { @@ -222,87 +276,158 @@ local nodes = { "default_stone.png^moreblocks_iron_checker.png", "default_stone.png^moreblocks_iron_checker.png^[transformR90", "default_stone.png^moreblocks_iron_checker.png^[transformR90"}, - groups = {cracky = 3}, + groups = {stone = 1, cracky = 3}, + is_ground_content = false, sounds = sound_stone, }, ["trap_stone"] = { description = S("Trap Stone"), + drawtype = "glasslike_framed", + tiles = {"default_stone.png^moreblocks_trap_box.png"}, walkable = false, groups = {cracky = 3}, + paramtype = "light", + is_ground_content = false, + sounds = sound_stone, + no_stairs = true, + }, + ["trap_desert_stone"] = { + description = S("Trap Desert Stone"), + drawtype = "glasslike_framed", + tiles = {"default_desert_stone.png^moreblocks_trap_box.png"}, + walkable = false, + groups = {cracky = 3}, + paramtype = "light", + is_ground_content = false, sounds = sound_stone, no_stairs = true, }, ["trap_glass"] = { description = S("Trap Glass"), drawtype = "glasslike_framed_optional", - --tiles = {"moreblocks_trap_glass.png", "default_glass_detail.png"}, - tiles = {"moreblocks_trap_glass.png"}, + tiles = {"default_glass.png^moreblocks_trap_box_glass.png", "default_glass_detail.png"}, paramtype = "light", 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, }, + ["trap_obsidian_glass"] = { + description = S("Trap Obsidian Glass"), + drawtype = "glasslike_framed_optional", + tiles = {"default_obsidian_glass.png^moreblocks_trap_box_glass.png", "default_obsidian_glass_detail.png"}, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + walkable = false, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, + sounds = sound_glass, + no_stairs = true, + }, + ["trap_obsidian"] = { + description = S("Trap Obsidian"), + drawtype = "glasslike_framed", + tiles = {"default_obsidian.png^moreblocks_trap_box.png"}, + walkable = false, + groups = {cracky = 1, level = 2}, + paramtype = "light", + is_ground_content = false, + sounds = sound_stone, + no_stairs = true, + }, + ["trap_sandstone"] = { + description = S("Trap Sandstone"), + drawtype = "glasslike_framed", + tiles = {"default_sandstone.png^moreblocks_trap_box.png"}, + walkable = false, + groups = {crumbly = 1, cracky = 3}, + paramtype = "light", + is_ground_content = false, + sounds = sound_stone, + 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 = 30, + furnace_burntime = 38, + }, + ["all_faces_pine_tree"] = { + description = S("All-faces Pine Tree"), + tiles = {"default_pine_tree_top.png"}, + 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, 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, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3}, + sounds = sound_wood, + furnace_burntime = 22, }, ["glow_glass"] = { description = S("Glow Glass"), drawtype = "glasslike_framed_optional", - --tiles = {"moreblocks_glow_glass.png", "moreblocks_glow_glass_detail.png"}, - tiles = {"moreblocks_glow_glass.png"}, + tiles = {"default_glass.png^[colorize:#E9CD61", "default_glass_detail.png^[colorize:#E9CD61"}, paramtype = "light", 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"] = { description = S("Trap Glow Glass"), drawtype = "glasslike_framed_optional", - --tiles = {"moreblocks_trap_glass.png", "moreblocks_glow_glass_detail.png"}, - tiles = {"moreblocks_trap_glass.png"}, + tiles = {"default_glass.png^[colorize:#E9CD61^moreblocks_trap_box_glass.png", "default_glass_detail.png^[colorize:#E9CD61"}, paramtype = "light", sunlight_propagates = true, + 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, }, ["super_glow_glass"] = { description = S("Super Glow Glass"), drawtype = "glasslike_framed_optional", - --tiles = {"moreblocks_super_glow_glass.png", "moreblocks_super_glow_glass_detail.png"}, - tiles = {"moreblocks_super_glow_glass.png"}, + tiles = {"default_glass.png^[colorize:#FFFF78", "default_glass_detail.png^[colorize:#FFFF78"}, paramtype = "light", sunlight_propagates = true, - light_source = 14, - groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3}, + is_ground_content = false, + light_source = default.LIGHT_MAX, + groups = {cracky = 3, oddly_breakable_by_hand = 3}, sounds = sound_glass, }, ["trap_super_glow_glass"] = { description = S("Trap Super Glow Glass"), drawtype = "glasslike_framed_optional", - --tiles = {"moreblocks_trap_super_glow_glass.png", "moreblocks_super_glow_glass_detail.png"}, - tiles = {"moreblocks_trap_super_glow_glass.png"}, + tiles = {"default_glass.png^[colorize:#FFFF78^moreblocks_trap_box_glass.png", "default_glass_detail.png^[colorize:#FFFF78"}, paramtype = "light", sunlight_propagates = true, - light_source = 14, + is_ground_content = false, + 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, }, @@ -313,6 +438,7 @@ local nodes = { wield_image = "moreblocks_rope.png", paramtype = "light", sunlight_propagates = true, + is_ground_content = false, paramtype2 = "wallmounted", walkable = false, climbable = true, @@ -324,6 +450,7 @@ local nodes = { ["copperpatina"] = { description = S("Copper Patina Block"), groups = {cracky = 1, level = 2}, + is_ground_content = false, sounds = sound_metal, }, } @@ -346,15 +473,9 @@ for name, def in pairs(nodes) do end end - -- Items minetest.register_craftitem("moreblocks:sweeper", { description = S("Sweeper"), inventory_image = "moreblocks_sweeper.png", }) - -minetest.register_craftitem("moreblocks:nothing", { - inventory_image = "invisible.png", - on_use = function() end, -}) -- cgit v1.2.3