1
0
forked from MTSR/moreblocks
moreblocks/nodes.lua

981 lines
30 KiB
Lua
Raw Permalink Normal View History

--[[
2015-01-12 19:46:22 +03:00
More Blocks: node definitions
2020-01-01 06:09:24 +03:00
Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
local S = moreblocks.S
2014-03-09 13:38:18 +04:00
local sound_dirt = moreblocks.node_sound_dirt_defaults()
local sound_wood = moreblocks.node_sound_wood_defaults()
local sound_stone = moreblocks.node_sound_stone_defaults()
local sound_glass = moreblocks.node_sound_glass_defaults()
local sound_leaves = moreblocks.node_sound_leaves_defaults()
-- Don't break on 0.4.14 and earlier.
local sound_metal = (moreblocks.node_sound_metal_defaults
2024-07-04 10:44:52 +03:00
and moreblocks.node_sound_metal_defaults() or sound_stone)
2014-03-09 13:38:18 +04:00
local function tile_tiles(name)
2014-07-21 14:24:49 +04:00
local tex = "moreblocks_" ..name.. ".png"
return {tex, tex, tex, tex, tex.. "^[transformR90", tex.. "^[transformR90"}
2014-03-09 13:38:18 +04:00
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
2021-11-14 04:14:19 +03:00
local deprecated = (" ("..S('Deprecated')..")")
2024-07-04 10:44:52 +03:00
-- start gravel add part 1
local sound_gravel = default.node_sound_gravel_defaults()
local box_slope = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
{-0.5, -0.25, -0.25, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.25, 0.5},
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}
}
}
local box_slope_half = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
{-0.5, -0.375, -0.25, 0.5, -0.25, 0.5},
{-0.5, -0.25, 0, 0.5, -0.125, 0.5},
{-0.5, -0.125, 0.25, 0.5, 0, 0.5},
}
}
local box_slope_half_raised = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
{-0.5, 0.125, -0.25, 0.5, 0.25, 0.5},
{-0.5, 0.25, 0, 0.5, 0.375, 0.5},
{-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
}
}
local box_slope_third = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.417 , 0.5},
{-0.5, -0.417, -0.25, 0.5, -0.333 , 0.5},
{-0.5, -0.333, 0, 0.5, -0.250 , 0.5},
{-0.5, -0.250, 0.25, 0.5, -0.167, 0.5},
}
}
local box_slope_third_raised = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.083 , 0.5},
{-0.5, -0.083, -0.25, 0.5, 0 , 0.5},
{-0.5, 0 , 0, 0.5, 0.083 , 0.5},
{-0.5, 0.083, 0.25, 0.5, 0.167, 0.5},
}
}
local box_slope_third_top = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.250, 0.5},
{-0.5, 0.250, -0.25, 0.5, 0.333, 0.5},
{-0.5, 0.333, 0, 0.5, 0.417, 0.5},
{-0.5, 0.417, 0.25, 0.5, 0.5 , 0.5},
}
}
-- end gravel add part 1
2014-03-09 13:38:18 +04:00
local nodes = {
["wood_tile"] = {
description = S("Wooden Tile"),
2017-03-05 00:50:09 +03:00
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_wood.png^moreblocks_wood_tile.png",
2024-07-04 10:44:52 +03:00
"default_wood.png^moreblocks_wood_tile.png",
"default_wood.png^moreblocks_wood_tile.png",
"default_wood.png^moreblocks_wood_tile.png",
"default_wood.png^moreblocks_wood_tile.png^[transformR90",
"default_wood.png^moreblocks_wood_tile.png^[transformR90"},
2014-03-09 13:38:18 +04:00
sounds = sound_wood,
},
["wood_tile_flipped"] = {
2018-07-13 15:22:35 +03:00
description = S("Wooden Tile") .. deprecated,
tiles = {"default_wood.png^moreblocks_wood_tile.png^[transformR90",
2024-07-04 10:44:52 +03:00
"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"},
no_stairs = true,
on_place = wood_tile_replace
},
2014-03-09 13:38:18 +04:00
["wood_tile_center"] = {
description = S("Centered Wooden Tile"),
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
tiles = {"default_wood.png^moreblocks_wood_tile_center.png"},
2014-03-09 13:38:18 +04:00
sounds = sound_wood,
},
["wood_tile_full"] = {
description = S("Full Wooden Tile"),
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
2014-03-09 13:38:18 +04:00
tiles = tile_tiles("wood_tile_full"),
sounds = sound_wood,
},
["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},
tiles = {"default_wood.png^moreblocks_wood_tile_offset.png"},
2014-03-09 13:38:18 +04:00
sounds = sound_wood,
no_stairs = true,
},
["wood_tile_down"] = {
2018-07-13 15:22:35 +03:00
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"] = {
2018-07-13 15:22:35 +03:00
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"] = {
2018-07-13 15:22:35 +03:00
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
},
2014-03-09 13:38:18 +04:00
["circle_stone_bricks"] = {
description = S("Circle Stone Bricks"),
groups = {stone = 1, cracky = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_stone,
},
["grey_bricks"] = {
description = S("Stone Bricks"),
paramtype2 = "facedir",
place_param2 = 0,
groups = {cracky = 3},
sounds = sound_stone,
},
2014-03-09 13:38:18 +04:00
["coal_stone_bricks"] = {
description = S("Coal Stone Bricks"),
paramtype2 = "facedir",
place_param2 = 0,
groups = {stone = 1, cracky = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_stone,
},
["iron_stone_bricks"] = {
description = S("Iron Stone Bricks"),
paramtype2 = "facedir",
place_param2 = 0,
groups = {stone = 1, cracky = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_stone,
},
["stone_tile"] = {
description = S("Stone Tile"),
groups = {stone = 1, cracky = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_stone,
},
["split_stone_tile"] = {
description = S("Split Stone Tile"),
paramtype2 = "facedir",
place_param2 = 0,
2014-03-09 13:38:18 +04:00
tiles = {"moreblocks_split_stone_tile_top.png",
2024-07-04 10:44:52 +03:00
"moreblocks_split_stone_tile.png"},
groups = {stone = 1, cracky = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_stone,
},
2017-03-05 00:50:09 +03:00
["checker_stone_tile"] = {
description = S("Checker Stone Tile"),
groups = {stone = 1, cracky = 3},
sounds = sound_stone,
},
["tar"] = {
description = S("Tar"),
groups = {cracky=2, tar_block=1},
sounds = sound_stone,
},
["dirt_compressed"] = {
description = S("Compressed Dirt"),
groups = {crumbly=2, compressed = 1},
sounds = sound_dirt,
},
["cobble_compressed"] = {
description = S("Compressed Cobblestone"),
groups = {cracky = 1, compressed = 1},
sounds = sound_stone,
},
["desert_cobble_compressed"] = {
description = S("Compressed Desert Cobblestone"),
groups = {cracky = 1, compressed = 1},
sounds = sound_stone,
},
2014-03-09 13:38:18 +04:00
["plankstone"] = {
description = S("Plankstone"),
paramtype2 = "facedir",
place_param2 = 0,
2014-06-02 21:30:07 +04:00
groups = {cracky = 3},
2014-03-09 13:38:18 +04:00
tiles = tile_tiles("plankstone"),
sounds = sound_stone,
},
["iron_glass"] = {
description = S("Iron Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"default_glass.png^[colorize:#DEDEDE", "default_glass_detail.png^[colorize:#DEDEDE"},
use_texture_alpha = "clip",
2014-03-09 13:38:18 +04:00
paramtype = "light",
sunlight_propagates = true,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_glass,
},
["coal_glass"] = {
description = S("Coal Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"default_glass.png^[colorize:#828282", "default_glass_detail.png^[colorize:#828282"},
use_texture_alpha = "clip",
2014-03-09 13:38:18 +04:00
paramtype = "light",
sunlight_propagates = true,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_glass,
},
["clean_glass"] = {
description = S("Clean Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"moreblocks_clean_glass.png", "moreblocks_clean_glass_detail.png"},
use_texture_alpha = "clip",
2014-03-09 13:38:18 +04:00
paramtype = "light",
sunlight_propagates = true,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_glass,
},
["cactus_brick"] = {
description = S("Cactus Brick"),
paramtype2 = "facedir",
place_param2 = 0,
2014-06-02 21:30:07 +04:00
groups = {cracky = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_stone,
},
["cactus_checker"] = {
description = S("Cactus Checker"),
groups = {stone = 1, cracky = 3},
tiles = {"default_stone.png^moreblocks_cactus_checker.png",
2024-07-04 10:44:52 +03:00
"default_stone.png^moreblocks_cactus_checker.png",
"default_stone.png^moreblocks_cactus_checker.png",
"default_stone.png^moreblocks_cactus_checker.png",
"default_stone.png^moreblocks_cactus_checker.png^[transformR90",
"default_stone.png^moreblocks_cactus_checker.png^[transformR90"},
2014-03-09 13:38:18 +04:00
sounds = sound_stone,
},
["empty_shelf"] = {
description = S("Empty Shelf"),
paramtype2 = "facedir",
tiles = {"default_wood.png", "default_wood.png", "default_wood.png",
2024-07-04 10:44:52 +03:00
"default_wood.png", "moreblocks_empty_shelf.png", "moreblocks_empty_shelf.png"},
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_wood,
furnace_burntime = 15,
2014-03-09 13:38:18 +04:00
no_stairs = true,
},
["coal_stone"] = {
description = S("Coal Stone"),
groups = {stone = 1, cracky = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_stone,
},
["iron_stone"] = {
description = S("Iron Stone"),
groups = {stone = 1, cracky = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_stone,
},
["coal_checker"] = {
description = S("Coal Checker"),
tiles = {"default_stone.png^moreblocks_coal_checker.png",
2024-07-04 10:44:52 +03:00
"default_stone.png^moreblocks_coal_checker.png",
"default_stone.png^moreblocks_coal_checker.png",
"default_stone.png^moreblocks_coal_checker.png",
"default_stone.png^moreblocks_coal_checker.png^[transformR90",
"default_stone.png^moreblocks_coal_checker.png^[transformR90"},
groups = {stone = 1, cracky = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_stone,
},
["iron_checker"] = {
description = S("Iron Checker"),
tiles = {"default_stone.png^moreblocks_iron_checker.png",
2024-07-04 10:44:52 +03:00
"default_stone.png^moreblocks_iron_checker.png",
"default_stone.png^moreblocks_iron_checker.png",
"default_stone.png^moreblocks_iron_checker.png",
"default_stone.png^moreblocks_iron_checker.png^[transformR90",
"default_stone.png^moreblocks_iron_checker.png^[transformR90"},
groups = {stone = 1, cracky = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_stone,
},
["trap_stone"] = {
description = S("Trap Stone"),
drawtype = "glasslike_framed",
2017-03-05 00:50:09 +03:00
tiles = {"default_stone.png^moreblocks_trap_box.png"},
walkable = false,
groups = {cracky = 3},
paramtype = "light",
2017-03-05 00:50:09 +03:00
sounds = sound_stone,
no_stairs = true,
},
["trap_desert_stone"] = {
description = S("Trap Desert Stone"),
drawtype = "glasslike_framed",
2017-03-05 00:50:09 +03:00
tiles = {"default_desert_stone.png^moreblocks_trap_box.png"},
2014-03-09 13:38:18 +04:00
walkable = false,
2014-06-02 21:30:07 +04:00
groups = {cracky = 3},
paramtype = "light",
2014-03-09 13:38:18 +04:00
sounds = sound_stone,
no_stairs = true,
},
["trap_glass"] = {
description = S("Trap Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"default_glass.png^moreblocks_trap_box_glass.png", "default_glass_detail.png"},
use_texture_alpha = "clip",
2014-03-09 13:38:18 +04:00
paramtype = "light",
sunlight_propagates = true,
walkable = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_glass,
no_stairs = true,
},
2017-03-05 00:50:09 +03:00
["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"},
use_texture_alpha = "clip",
2017-03-05 00:50:09 +03:00
paramtype = "light",
sunlight_propagates = true,
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",
2017-03-05 00:50:09 +03:00
tiles = {"default_obsidian.png^moreblocks_trap_box.png"},
walkable = false,
groups = {cracky = 1, level = 2},
paramtype = "light",
2017-03-05 00:50:09 +03:00
sounds = sound_stone,
no_stairs = true,
},
["trap_clean_glass"] = {
description = S("Trap Clean Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"moreblocks_clean_glass.png^moreblocks_trap_box_glass.png", "moreblocks_clean_glass_detail.png"},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
no_stairs = true,
},
2017-03-05 00:50:09 +03:00
["trap_sandstone"] = {
description = S("Trap Sandstone"),
drawtype = "glasslike_framed",
2017-03-05 00:50:09 +03:00
tiles = {"default_sandstone.png^moreblocks_trap_box.png"},
walkable = false,
groups = {crumbly = 1, cracky = 3},
paramtype = "light",
2017-03-05 00:50:09 +03:00
sounds = sound_stone,
no_stairs = true,
},
2014-03-09 13:38:18 +04:00
["all_faces_tree"] = {
description = S("All-faces Tree"),
tiles = {"default_tree_top.png"},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
2014-03-09 13:38:18 +04:00
sounds = sound_wood,
furnace_burntime = 30,
},
["all_faces_jungle_tree"] = {
description = S("All-faces Jungle Tree"),
2014-03-09 13:38:18 +04:00
tiles = {"default_jungletree_top.png"},
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
2014-03-09 13:38:18 +04:00
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, 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,
2014-03-09 13:38:18 +04:00
},
["glow_glass"] = {
description = S("Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"default_glass.png^[colorize:#E9CD61", "default_glass_detail.png^[colorize:#E9CD61"},
use_texture_alpha = "clip",
2014-03-09 13:38:18 +04:00
paramtype = "light",
sunlight_propagates = true,
light_source = 11,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_glass,
},
["clean_glow_glass"] = {
description = S("Clean Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"moreblocks_clean_glass.png^[colorize:#E9CD61", "moreblocks_clean_glass_detail.png^[colorize:#E9CD61"},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
light_source = 11,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
},
2014-03-09 13:38:18 +04:00
["trap_glow_glass"] = {
description = S("Trap Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"default_glass.png^[colorize:#E9CD61^moreblocks_trap_box_glass.png", "default_glass_detail.png^[colorize:#E9CD61"},
use_texture_alpha = "clip",
2014-03-09 13:38:18 +04:00
paramtype = "light",
sunlight_propagates = true,
light_source = 11,
walkable = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_glass,
no_stairs = true,
},
["trap_clean_glow_glass"] = {
description = S("Trap Clean Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"moreblocks_clean_glass.png^[colorize:#E9CD61^moreblocks_trap_box_glass.png", "moreblocks_clean_glass_detail.png^[colorize:#E9CD61"},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
light_source = 11,
walkable = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
no_stairs = true,
},
2014-03-09 13:38:18 +04:00
["super_glow_glass"] = {
description = S("Super Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"default_glass.png^[colorize:#FFFF78", "default_glass_detail.png^[colorize:#FFFF78"},
use_texture_alpha = "clip",
2014-03-09 13:38:18 +04:00
paramtype = "light",
sunlight_propagates = true,
light_source = default.LIGHT_MAX,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_glass,
},
["clean_super_glow_glass"] = {
description = S("Clean Super Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"moreblocks_clean_glass.png^[colorize:#FFFF78", "moreblocks_clean_glass_detail.png^[colorize:#FFFF78"},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
light_source = default.LIGHT_MAX,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
},
2014-03-09 13:38:18 +04:00
["trap_super_glow_glass"] = {
description = S("Trap Super Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"default_glass.png^[colorize:#FFFF78^moreblocks_trap_box_glass.png", "default_glass_detail.png^[colorize:#FFFF78"},
use_texture_alpha = "clip",
2014-03-09 13:38:18 +04:00
paramtype = "light",
sunlight_propagates = true,
light_source = default.LIGHT_MAX,
2014-03-09 13:38:18 +04:00
walkable = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
2014-03-09 13:38:18 +04:00
sounds = sound_glass,
no_stairs = true,
},
["trap_clean_super_glow_glass"] = {
description = S("Trap Clean Super Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {"moreblocks_clean_glass.png^[colorize:#FFFF78^moreblocks_trap_box_glass.png", "moreblocks_clean_glass_detail.png^[colorize:#FFFF78"},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
light_source = default.LIGHT_MAX,
walkable = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
no_stairs = true,
},
2014-03-09 13:38:18 +04:00
["rope"] = {
description = S("Rope"),
drawtype = "signlike",
inventory_image = "moreblocks_rope.png",
wield_image = "moreblocks_rope.png",
paramtype = "light",
sunlight_propagates = true,
2014-03-09 13:38:18 +04:00
paramtype2 = "wallmounted",
walkable = false,
climbable = true,
selection_box = {type = "wallmounted",},
groups = {snappy = 3, flammable = 2},
2014-03-09 13:38:18 +04:00
sounds = sound_leaves,
no_stairs = true,
},
["copperpatina"] = {
description = S("Copper Patina Block"),
groups = {cracky = 1, level = 2},
sounds = sound_metal,
},
2024-07-04 10:44:52 +03:00
["gravel_stonebrick"] = {
description = S("Gravel on Stonebrick"),
tiles = {"default_gravel.png",
"default_stone_brick.png",
"default_gravel.png^[lowpart:50:default_stone_brick.png",
"default_gravel.png^[lowpart:50:default_stone_brick.png",
"default_gravel.png^[lowpart:50:default_stone_brick.png",
"default_gravel.png^[lowpart:50:default_stone_brick.png"},
no_stairs = true;
groups = {cracky = 3},
sounds = sound_gravel,
},
-- start gravel add part 2
["gravel_slope"] = {
description = S("Gravel Slope"),
tiles = { "default_gravel.png" } ,
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = sound_gravel,
drawtype = "mesh",
mesh = "moreblocks_slope.obj",
collision_box = box_slope,
selection_box = box_slope,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
},
["gravel_slope_2a"] = {
description = S("Gravel Slope 2a"),
tiles = { "default_gravel.png" } ,
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = sound_gravel,
drawtype = "mesh",
mesh = "moreblocks_slope_half.obj",
collision_box = box_slope_half,
selection_box = box_slope_half,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
},
["gravel_slope_2b"] = {
description = S("Gravel Slope 2b"),
tiles = { "default_gravel.png" } ,
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = sound_gravel,
drawtype = "mesh",
mesh = "moreblocks_slope_half_raised.obj",
collision_box = box_slope_half_raised,
selection_box = box_slope_half_raised,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
},
["gravel_slope_3a"] = {
description = S("Gravel Slope 3a"),
tiles = { "default_gravel.png" } ,
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = sound_gravel,
drawtype = "mesh",
mesh = "moreblocks_slope_third.obj",
collision_box = box_slope_third,
selection_box = box_slope_third,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
},
["gravel_slope_3b"] = {
description = S("Gravel Slope 3b"),
tiles = { "default_gravel.png" } ,
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = sound_gravel,
drawtype = "mesh",
mesh = "moreblocks_slope_third_raised.obj",
collision_box = box_slope_third_raised,
selection_box = box_slope_third_raised,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
},
["gravel_slope_3c"] = {
description = S("Gravel Slope 3c"),
tiles = { "default_gravel.png" } ,
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = sound_gravel,
drawtype = "mesh",
mesh = "moreblocks_slope_third_top.obj",
collision_box = box_slope_third_top,
selection_box = box_slope_third_top,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
},
-- end gravel add part 2
---- Песок начало sand ---
["sand_slope"] = {
description = S("Sand Slope"),
tiles = { "default_sand.png" } ,
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = sound_sand,
drawtype = "mesh",
mesh = "moreblocks_slope.obj",
collision_box = box_slope,
selection_box = box_slope,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
},
["sand_slope_2a"] = {
description = S("Sand Slope 2a"),
tiles = { "default_sand.png" } ,
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = sound_sand,
drawtype = "mesh",
mesh = "moreblocks_slope_half.obj",
collision_box = box_slope_half,
selection_box = box_slope_half,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
},
["sand_slope_2b"] = {
description = S("Sand Slope 2b"),
tiles = { "default_sand.png" } ,
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = sound_sand,
drawtype = "mesh",
mesh = "moreblocks_slope_half_raised.obj",
collision_box = box_slope_half_raised,
selection_box = box_slope_half_raised,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
},
["sand_slope_3a"] = {
description = S("Sand Slope 3a"),
tiles = { "default_sand.png" } ,
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = sound_sand,
drawtype = "mesh",
mesh = "moreblocks_slope_third.obj",
collision_box = box_slope_third,
selection_box = box_slope_third,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
},
["sand_slope_3b"] = {
description = S("Sand Slope 3b"),
tiles = { "default_sand.png" } ,
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = sound_sand,
drawtype = "mesh",
mesh = "moreblocks_slope_third_raised.obj",
collision_box = box_slope_third_raised,
selection_box = box_slope_third_raised,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
},
["sand_slope_3c"] = {
description = S("Sand Slope 3c"),
tiles = { "default_sand.png" } ,
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = sound_sand,
drawtype = "mesh",
mesh = "moreblocks_slope_third_top.obj",
collision_box = box_slope_third_top,
selection_box = box_slope_third_top,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
},
--- Хвойная земля
["dirt_with_coniferous_litter_slope"] = {
description = S("Dirt with coniferous litter Slope"),
--
tiles = {"default_coniferous_litter.png",
"default_dirt.png",
"default_coniferous_litter.png^[lowpart:65:default_dirt.png"},
--
--tiles = { "default_coniferous_litter.png" } ,
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
--sounds = sound_dirt_with_coniferous_litter,
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_grass_footstep", gain = 0.4},
}),
drawtype = "mesh",
mesh = "moreblocks_slope.obj",
collision_box = box_slope,
selection_box = box_slope,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
},
["dirt_with_coniferous_litter_slope_2a"] = {
description = S("Dirt with coniferous litter Slope 2a"),
--tiles = { "default_coniferous_litter.png" } ,
tiles = {"default_coniferous_litter.png",
"default_dirt.png",
"default_coniferous_litter.png^[lowpart:65:default_dirt.png"},
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_grass_footstep", gain = 0.4},
}),
drawtype = "mesh",
mesh = "moreblocks_slope_half.obj",
collision_box = box_slope_half,
selection_box = box_slope_half,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
},
["dirt_with_coniferous_litter_slope_2b"] = {
description = S("Dirt with coniferous litter Slope 2b"),
tiles = {"default_coniferous_litter.png",
"default_dirt.png",
"default_coniferous_litter.png^[lowpart:65:default_dirt.png"},
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_grass_footstep", gain = 0.4},
}),
drawtype = "mesh",
mesh = "moreblocks_slope_half_raised.obj",
collision_box = box_slope_half_raised,
selection_box = box_slope_half_raised,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
},
["dirt_with_coniferous_litter_slope_3a"] = {
description = S("Dirt with coniferous litter Slope 3a"),
tiles = {"default_coniferous_litter.png",
"default_dirt.png",
"default_coniferous_litter.png^[lowpart:60:default_dirt.png"},
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_grass_footstep", gain = 0.4},
}),
drawtype = "mesh",
mesh = "moreblocks_slope_third.obj",
collision_box = box_slope_third,
selection_box = box_slope_third,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
},
["dirt_with_coniferous_litter_slope_3b"] = {
description = S("Dirt with coniferous litter Slope 3b"),
tiles = {"default_coniferous_litter.png",
"default_dirt.png"},
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_grass_footstep", gain = 0.4},
}),
drawtype = "mesh",
mesh = "moreblocks_slope_third_raised.obj",
collision_box = box_slope_third_raised,
selection_box = box_slope_third_raised,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
},
["dirt_with_coniferous_litter_slope_3c"] = {
description = S("Dirt with coniferous litter Slope 3c"),
tiles = {"default_coniferous_litter.png",
"default_dirt.png",
"default_coniferous_litter.png^[lowpart:65:default_dirt.png"},
no_stairs = true,
groups = {crumbly = 2, falling_node = 1, not_blocking_trains = 1},
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_grass_footstep", gain = 0.4},
}),
drawtype = "mesh",
mesh = "moreblocks_slope_third_top.obj",
collision_box = box_slope_third_top,
selection_box = box_slope_third_top,
sunlight_propagates = false,
light_source = 0,
paramtype = "light",
paramtype2 = "facedir", -- neu
on_rotate = screwdriver.rotate_simple , -- neu
is_ground_content = false, --neu
}
---- Песок конец sand ---
2014-03-09 13:38:18 +04:00
}
for name, def in pairs(nodes) do
def.is_ground_content = def.is_ground_content == true
2014-07-21 14:24:49 +04:00
def.tiles = def.tiles or {"moreblocks_" ..name.. ".png"}
minetest.register_node("moreblocks:" ..name, def)
minetest.register_alias(name, "moreblocks:" ..name)
def_copy = table.copy(def)
-- Use the primary tile for all sides of cut glasslike nodes.
-- This makes them easier to see
if
2024-07-04 10:44:52 +03:00
#def_copy.tiles > 1 and
def_copy.drawtype and
def_copy.drawtype == "glasslike_framed" or
def_copy.drawtype == "glasslike_framed_optional"
then
def.tiles = {def_copy.tiles[1]}
end
2014-03-09 13:38:18 +04:00
if not def.no_stairs then
local groups = {}
for k, v in pairs(def.groups) do groups[k] = v end
2014-07-21 14:24:49 +04:00
stairsplus:register_all("moreblocks", name, "moreblocks:" ..name, {
2014-03-09 13:38:18 +04:00
description = def.description,
groups = groups,
tiles = def.tiles,
sunlight_propagates = def.sunlight_propagates,
light_source = def.light_source,
sounds = def.sounds,
})
end
end
-- Items
minetest.register_craftitem("moreblocks:sweeper", {
description = S("Sweeper"),
inventory_image = "moreblocks_sweeper.png",
})