2015-01-11 22:21:33 +01:00
|
|
|
--[[
|
2015-01-12 17:46:22 +01:00
|
|
|
More Blocks: node definitions
|
2015-01-11 22:21:33 +01:00
|
|
|
|
2019-02-25 12:13:55 +01:00
|
|
|
Copyright © 2011-2019 Hugo Locurcio and contributors.
|
2015-01-11 22:21:33 +01:00
|
|
|
Licensed under the zlib license. See LICENSE.md for more information.
|
|
|
|
--]]
|
|
|
|
|
2019-03-03 20:02:40 +01:00
|
|
|
local S = moreblocks.S
|
2014-03-09 10:38:18 +01:00
|
|
|
|
Add compressed dirt, remove redundant tar
Tar already exists in building_blocks, and the recipe to cook it comes into conflict with what's in streetsmod, where gravel can be cooked into asphalt. However, the texture for it is retained in case it needs to be derived from again in the future.
Dirt can be collected in as much quanitites as cobblestone can be, so in place of tar is a way to pack dirt when so much of it is collected.
The compressed dirt shares most properities with the compressed cobble, except that can be dug by hand, but digging it takes as long as with gravel. Its texture is a recolor of this mod's tar block.
In addition, a function for dirt sound has been added, and compressed dirt makes use of it.
The new node is inspired in part by a counterpart on the Xanadu server, where there is also a counterpart to compressed cobble.
2016-12-06 01:10:25 +01:00
|
|
|
local sound_dirt = default.node_sound_dirt_defaults()
|
2014-03-09 10:38:18 +01:00
|
|
|
local sound_wood = default.node_sound_wood_defaults()
|
|
|
|
local sound_stone = default.node_sound_stone_defaults()
|
|
|
|
local sound_glass = default.node_sound_glass_defaults()
|
|
|
|
local sound_leaves = default.node_sound_leaves_defaults()
|
2016-12-19 13:29:17 +01:00
|
|
|
|
|
|
|
-- Don't break on 0.4.14 and earlier.
|
|
|
|
local sound_metal = (default.node_sound_metal_defaults
|
|
|
|
and default.node_sound_metal_defaults() or sound_stone)
|
2014-03-09 10:38:18 +01:00
|
|
|
|
|
|
|
local function tile_tiles(name)
|
2014-07-21 12:24:49 +02:00
|
|
|
local tex = "moreblocks_" ..name.. ".png"
|
|
|
|
return {tex, tex, tex, tex, tex.. "^[transformR90", tex.. "^[transformR90"}
|
2014-03-09 10:38:18 +01:00
|
|
|
end
|
|
|
|
|
2017-12-30 00:53:52 +01:00
|
|
|
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
|
|
|
|
|
2018-07-13 14:22:35 +02:00
|
|
|
local deprecated = (" (%s)"):format(S('Deprecated'))
|
2014-03-09 10:38:18 +01:00
|
|
|
local nodes = {
|
|
|
|
["wood_tile"] = {
|
|
|
|
description = S("Wooden Tile"),
|
2017-03-04 22:50:09 +01:00
|
|
|
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2016-12-05 22:56:48 +01:00
|
|
|
paramtype2 = "facedir",
|
|
|
|
place_param2 = 0,
|
2014-06-02 19:26:56 +02:00
|
|
|
tiles = {"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",
|
|
|
|
"default_wood.png^moreblocks_wood_tile.png^[transformR90",
|
|
|
|
"default_wood.png^moreblocks_wood_tile.png^[transformR90"},
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_wood,
|
|
|
|
},
|
2017-12-30 00:53:52 +01:00
|
|
|
["wood_tile_flipped"] = {
|
2018-07-13 14:22:35 +02:00
|
|
|
description = S("Wooden Tile") .. deprecated,
|
2017-12-30 00:53:52 +01:00
|
|
|
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"},
|
|
|
|
no_stairs = true,
|
|
|
|
on_place = wood_tile_replace
|
|
|
|
},
|
2014-03-09 10:38:18 +01:00
|
|
|
["wood_tile_center"] = {
|
|
|
|
description = S("Centered Wooden Tile"),
|
2016-12-05 22:56:48 +01:00
|
|
|
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2014-06-02 18:38:19 +02:00
|
|
|
tiles = {"default_wood.png^moreblocks_wood_tile_center.png"},
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_wood,
|
|
|
|
},
|
|
|
|
["wood_tile_full"] = {
|
|
|
|
description = S("Full Wooden Tile"),
|
2016-12-05 22:56:48 +01:00
|
|
|
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2014-03-09 10:38:18 +01:00
|
|
|
tiles = tile_tiles("wood_tile_full"),
|
|
|
|
sounds = sound_wood,
|
|
|
|
},
|
2017-12-30 00:53:52 +01:00
|
|
|
["wood_tile_offset"] = {
|
|
|
|
description = S("Offset Wooden Tile"),
|
2016-12-05 22:56:48 +01:00
|
|
|
paramtype2 = "facedir",
|
|
|
|
place_param2 = 0,
|
|
|
|
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2017-12-30 00:53:52 +01:00
|
|
|
tiles = {"default_wood.png^moreblocks_wood_tile_offset.png"},
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_wood,
|
|
|
|
no_stairs = true,
|
|
|
|
},
|
2017-12-30 00:53:52 +01:00
|
|
|
["wood_tile_down"] = {
|
2018-07-13 14:22:35 +02:00
|
|
|
description = S("Downwards Wooden Tile") .. deprecated,
|
2017-12-30 00:53:52 +01:00
|
|
|
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 14:22:35 +02:00
|
|
|
description = S("Leftwards Wooden Tile") .. deprecated,
|
2017-12-30 00:53:52 +01:00
|
|
|
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 14:22:35 +02:00
|
|
|
description = S("Rightwards Wooden Tile") .. deprecated,
|
2017-12-30 00:53:52 +01:00
|
|
|
tiles = {"default_wood.png^[transformR90^moreblocks_wood_tile_offset.png^[transformR90"},
|
|
|
|
no_stairs = true,
|
|
|
|
on_place = wood_tile_replace
|
|
|
|
},
|
2014-03-09 10:38:18 +01:00
|
|
|
["circle_stone_bricks"] = {
|
|
|
|
description = S("Circle Stone Bricks"),
|
2016-12-05 21:27:37 +01:00
|
|
|
groups = {stone = 1, cracky = 3},
|
|
|
|
is_ground_content = false,
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_stone,
|
|
|
|
},
|
2014-06-27 20:14:08 +02:00
|
|
|
["grey_bricks"] = {
|
|
|
|
description = S("Stone Bricks"),
|
2016-12-05 22:56:48 +01:00
|
|
|
paramtype2 = "facedir",
|
|
|
|
place_param2 = 0,
|
2014-06-27 20:14:08 +02:00
|
|
|
groups = {cracky = 3},
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2014-06-27 20:14:08 +02:00
|
|
|
sounds = sound_stone,
|
|
|
|
},
|
2014-03-09 10:38:18 +01:00
|
|
|
["coal_stone_bricks"] = {
|
|
|
|
description = S("Coal Stone Bricks"),
|
2016-12-05 22:56:48 +01:00
|
|
|
paramtype2 = "facedir",
|
|
|
|
place_param2 = 0,
|
2016-12-05 21:27:37 +01:00
|
|
|
groups = {stone = 1, cracky = 3},
|
|
|
|
is_ground_content = false,
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_stone,
|
|
|
|
},
|
|
|
|
["iron_stone_bricks"] = {
|
|
|
|
description = S("Iron Stone Bricks"),
|
2016-12-05 22:56:48 +01:00
|
|
|
paramtype2 = "facedir",
|
|
|
|
place_param2 = 0,
|
2016-12-05 21:27:37 +01:00
|
|
|
groups = {stone = 1, cracky = 3},
|
|
|
|
is_ground_content = false,
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_stone,
|
|
|
|
},
|
|
|
|
["stone_tile"] = {
|
|
|
|
description = S("Stone Tile"),
|
2016-12-05 21:27:37 +01:00
|
|
|
groups = {stone = 1, cracky = 3},
|
|
|
|
is_ground_content = false,
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_stone,
|
|
|
|
},
|
|
|
|
["split_stone_tile"] = {
|
|
|
|
description = S("Split Stone Tile"),
|
2016-12-05 22:56:48 +01:00
|
|
|
paramtype2 = "facedir",
|
|
|
|
place_param2 = 0,
|
2014-03-09 10:38:18 +01:00
|
|
|
tiles = {"moreblocks_split_stone_tile_top.png",
|
|
|
|
"moreblocks_split_stone_tile.png"},
|
2016-12-05 21:27:37 +01:00
|
|
|
groups = {stone = 1, cracky = 3},
|
|
|
|
is_ground_content = false,
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_stone,
|
|
|
|
},
|
2017-03-04 22:50:09 +01:00
|
|
|
["checker_stone_tile"] = {
|
|
|
|
description = S("Checker Stone Tile"),
|
2016-12-05 21:27:37 +01:00
|
|
|
groups = {stone = 1, cracky = 3},
|
|
|
|
is_ground_content = false,
|
2014-06-27 20:14:08 +02:00
|
|
|
sounds = sound_stone,
|
|
|
|
},
|
2017-12-29 20:30:05 +01:00
|
|
|
["tar"] = {
|
|
|
|
description = S("Tar"),
|
|
|
|
groups = {cracky=2, tar_block=1},
|
|
|
|
is_ground_content = false,
|
|
|
|
sounds = sound_stone,
|
|
|
|
},
|
Add compressed dirt, remove redundant tar
Tar already exists in building_blocks, and the recipe to cook it comes into conflict with what's in streetsmod, where gravel can be cooked into asphalt. However, the texture for it is retained in case it needs to be derived from again in the future.
Dirt can be collected in as much quanitites as cobblestone can be, so in place of tar is a way to pack dirt when so much of it is collected.
The compressed dirt shares most properities with the compressed cobble, except that can be dug by hand, but digging it takes as long as with gravel. Its texture is a recolor of this mod's tar block.
In addition, a function for dirt sound has been added, and compressed dirt makes use of it.
The new node is inspired in part by a counterpart on the Xanadu server, where there is also a counterpart to compressed cobble.
2016-12-06 01:10:25 +01:00
|
|
|
["dirt_compressed"] = {
|
|
|
|
description = S("Compressed Dirt"),
|
2016-12-08 05:26:38 +01:00
|
|
|
groups = {crumbly=2},
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
Add compressed dirt, remove redundant tar
Tar already exists in building_blocks, and the recipe to cook it comes into conflict with what's in streetsmod, where gravel can be cooked into asphalt. However, the texture for it is retained in case it needs to be derived from again in the future.
Dirt can be collected in as much quanitites as cobblestone can be, so in place of tar is a way to pack dirt when so much of it is collected.
The compressed dirt shares most properities with the compressed cobble, except that can be dug by hand, but digging it takes as long as with gravel. Its texture is a recolor of this mod's tar block.
In addition, a function for dirt sound has been added, and compressed dirt makes use of it.
The new node is inspired in part by a counterpart on the Xanadu server, where there is also a counterpart to compressed cobble.
2016-12-06 01:10:25 +01:00
|
|
|
sounds = sound_dirt,
|
2014-06-27 20:14:08 +02:00
|
|
|
},
|
2014-12-14 10:33:57 +01:00
|
|
|
["cobble_compressed"] = {
|
|
|
|
description = S("Compressed Cobblestone"),
|
|
|
|
groups = {cracky = 1},
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2014-12-14 10:33:57 +01:00
|
|
|
sounds = sound_stone,
|
|
|
|
},
|
2014-03-09 10:38:18 +01:00
|
|
|
["plankstone"] = {
|
|
|
|
description = S("Plankstone"),
|
2016-12-05 22:56:48 +01:00
|
|
|
paramtype2 = "facedir",
|
|
|
|
place_param2 = 0,
|
2014-06-02 19:30:07 +02:00
|
|
|
groups = {cracky = 3},
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2014-03-09 10:38:18 +01:00
|
|
|
tiles = tile_tiles("plankstone"),
|
|
|
|
sounds = sound_stone,
|
|
|
|
},
|
|
|
|
["iron_glass"] = {
|
|
|
|
description = S("Iron Glass"),
|
2015-01-23 18:52:02 +01:00
|
|
|
drawtype = "glasslike_framed_optional",
|
2017-12-29 23:41:17 +01:00
|
|
|
tiles = {"default_glass.png^[colorize:#DEDEDE", "default_glass_detail.png^[colorize:#DEDEDE"},
|
2014-03-09 10:38:18 +01:00
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2016-12-05 22:56:48 +01:00
|
|
|
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_glass,
|
|
|
|
},
|
|
|
|
["coal_glass"] = {
|
|
|
|
description = S("Coal Glass"),
|
2015-01-23 18:52:02 +01:00
|
|
|
drawtype = "glasslike_framed_optional",
|
2017-12-29 23:41:17 +01:00
|
|
|
tiles = {"default_glass.png^[colorize:#828282", "default_glass_detail.png^[colorize:#828282"},
|
2014-03-09 10:38:18 +01:00
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2016-12-05 22:56:48 +01:00
|
|
|
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_glass,
|
|
|
|
},
|
|
|
|
["clean_glass"] = {
|
|
|
|
description = S("Clean Glass"),
|
2015-01-23 18:52:02 +01:00
|
|
|
drawtype = "glasslike_framed_optional",
|
2017-12-29 23:41:17 +01:00
|
|
|
tiles = {"moreblocks_clean_glass.png", "moreblocks_clean_glass_detail.png"},
|
2014-03-09 10:38:18 +01:00
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2016-12-05 22:56:48 +01:00
|
|
|
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_glass,
|
|
|
|
},
|
|
|
|
["cactus_brick"] = {
|
|
|
|
description = S("Cactus Brick"),
|
2016-12-05 22:56:48 +01:00
|
|
|
paramtype2 = "facedir",
|
|
|
|
place_param2 = 0,
|
2014-06-02 19:30:07 +02:00
|
|
|
groups = {cracky = 3},
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_stone,
|
|
|
|
},
|
|
|
|
["cactus_checker"] = {
|
|
|
|
description = S("Cactus Checker"),
|
2016-12-05 21:27:37 +01:00
|
|
|
groups = {stone = 1, cracky = 3},
|
|
|
|
is_ground_content = false,
|
2014-06-02 19:26:56 +02:00
|
|
|
tiles = {"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",
|
|
|
|
"default_stone.png^moreblocks_cactus_checker.png^[transformR90",
|
|
|
|
"default_stone.png^moreblocks_cactus_checker.png^[transformR90"},
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_stone,
|
|
|
|
},
|
2016-12-05 23:15:34 +01:00
|
|
|
["empty_shelf"] = {
|
|
|
|
description = S("Empty Shelf"),
|
2016-12-05 22:56:48 +01:00
|
|
|
paramtype2 = "facedir",
|
|
|
|
tiles = {"default_wood.png", "default_wood.png", "default_wood.png",
|
2016-12-05 23:15:34 +01:00
|
|
|
"default_wood.png", "moreblocks_empty_shelf.png", "moreblocks_empty_shelf.png"},
|
2016-12-05 22:56:48 +01:00
|
|
|
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_wood,
|
2016-12-03 18:53:07 +01:00
|
|
|
furnace_burntime = 15,
|
2014-03-09 10:38:18 +01:00
|
|
|
no_stairs = true,
|
|
|
|
},
|
|
|
|
["coal_stone"] = {
|
|
|
|
description = S("Coal Stone"),
|
2016-12-05 21:27:37 +01:00
|
|
|
groups = {stone = 1, cracky = 3},
|
|
|
|
is_ground_content = false,
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_stone,
|
|
|
|
},
|
|
|
|
["iron_stone"] = {
|
|
|
|
description = S("Iron Stone"),
|
2016-12-05 21:27:37 +01:00
|
|
|
groups = {stone = 1, cracky = 3},
|
|
|
|
is_ground_content = false,
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_stone,
|
|
|
|
},
|
|
|
|
["coal_checker"] = {
|
|
|
|
description = S("Coal Checker"),
|
2014-06-02 19:26:56 +02:00
|
|
|
tiles = {"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",
|
|
|
|
"default_stone.png^moreblocks_coal_checker.png^[transformR90",
|
|
|
|
"default_stone.png^moreblocks_coal_checker.png^[transformR90"},
|
2016-12-05 21:27:37 +01:00
|
|
|
groups = {stone = 1, cracky = 3},
|
|
|
|
is_ground_content = false,
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_stone,
|
|
|
|
},
|
|
|
|
["iron_checker"] = {
|
|
|
|
description = S("Iron Checker"),
|
2014-06-02 19:26:56 +02:00
|
|
|
tiles = {"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",
|
|
|
|
"default_stone.png^moreblocks_iron_checker.png^[transformR90",
|
|
|
|
"default_stone.png^moreblocks_iron_checker.png^[transformR90"},
|
2016-12-05 21:27:37 +01:00
|
|
|
groups = {stone = 1, cracky = 3},
|
|
|
|
is_ground_content = false,
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_stone,
|
|
|
|
},
|
|
|
|
["trap_stone"] = {
|
|
|
|
description = S("Trap Stone"),
|
2016-12-08 05:46:15 +01:00
|
|
|
drawtype = "glasslike_framed",
|
2017-03-04 22:50:09 +01:00
|
|
|
tiles = {"default_stone.png^moreblocks_trap_box.png"},
|
|
|
|
walkable = false,
|
|
|
|
groups = {cracky = 3},
|
2016-12-08 05:46:15 +01:00
|
|
|
paramtype = "light",
|
2017-03-04 22:50:09 +01:00
|
|
|
is_ground_content = false,
|
|
|
|
sounds = sound_stone,
|
|
|
|
no_stairs = true,
|
|
|
|
},
|
|
|
|
["trap_desert_stone"] = {
|
|
|
|
description = S("Trap Desert Stone"),
|
2016-12-08 05:46:15 +01:00
|
|
|
drawtype = "glasslike_framed",
|
2017-03-04 22:50:09 +01:00
|
|
|
tiles = {"default_desert_stone.png^moreblocks_trap_box.png"},
|
2014-03-09 10:38:18 +01:00
|
|
|
walkable = false,
|
2014-06-02 19:30:07 +02:00
|
|
|
groups = {cracky = 3},
|
2016-12-08 05:46:15 +01:00
|
|
|
paramtype = "light",
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_stone,
|
|
|
|
no_stairs = true,
|
|
|
|
},
|
|
|
|
["trap_glass"] = {
|
|
|
|
description = S("Trap Glass"),
|
2015-01-23 18:52:02 +01:00
|
|
|
drawtype = "glasslike_framed_optional",
|
2017-12-29 23:41:17 +01:00
|
|
|
tiles = {"default_glass.png^moreblocks_trap_box_glass.png", "default_glass_detail.png"},
|
2014-03-09 10:38:18 +01:00
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2014-03-09 10:38:18 +01:00
|
|
|
walkable = false,
|
2016-12-05 22:56:48 +01:00
|
|
|
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_glass,
|
|
|
|
no_stairs = true,
|
|
|
|
},
|
2017-03-04 22:50:09 +01:00
|
|
|
["trap_obsidian_glass"] = {
|
|
|
|
description = S("Trap Obsidian Glass"),
|
|
|
|
drawtype = "glasslike_framed_optional",
|
2017-12-29 23:41:17 +01:00
|
|
|
tiles = {"default_obsidian_glass.png^moreblocks_trap_box_glass.png", "default_obsidian_glass_detail.png"},
|
2017-03-04 22:50:09 +01:00
|
|
|
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"),
|
2016-12-08 05:46:15 +01:00
|
|
|
drawtype = "glasslike_framed",
|
2017-03-04 22:50:09 +01:00
|
|
|
tiles = {"default_obsidian.png^moreblocks_trap_box.png"},
|
|
|
|
walkable = false,
|
|
|
|
groups = {cracky = 1, level = 2},
|
2016-12-08 05:46:15 +01:00
|
|
|
paramtype = "light",
|
2017-03-04 22:50:09 +01:00
|
|
|
is_ground_content = false,
|
|
|
|
sounds = sound_stone,
|
|
|
|
no_stairs = true,
|
|
|
|
},
|
|
|
|
["trap_sandstone"] = {
|
|
|
|
description = S("Trap Sandstone"),
|
2016-12-08 05:46:15 +01:00
|
|
|
drawtype = "glasslike_framed",
|
2017-03-04 22:50:09 +01:00
|
|
|
tiles = {"default_sandstone.png^moreblocks_trap_box.png"},
|
|
|
|
walkable = false,
|
|
|
|
groups = {crumbly = 1, cracky = 3},
|
2016-12-08 05:46:15 +01:00
|
|
|
paramtype = "light",
|
2017-03-04 22:50:09 +01:00
|
|
|
is_ground_content = false,
|
|
|
|
sounds = sound_stone,
|
|
|
|
no_stairs = true,
|
|
|
|
},
|
2014-03-09 10:38:18 +01:00
|
|
|
["all_faces_tree"] = {
|
|
|
|
description = S("All-faces Tree"),
|
|
|
|
tiles = {"default_tree_top.png"},
|
2016-12-05 22:56:48 +01:00
|
|
|
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_wood,
|
|
|
|
furnace_burntime = 30,
|
|
|
|
},
|
|
|
|
["all_faces_jungle_tree"] = {
|
2014-04-30 19:50:59 +02:00
|
|
|
description = S("All-faces Jungle Tree"),
|
2014-03-09 10:38:18 +01:00
|
|
|
tiles = {"default_jungletree_top.png"},
|
2016-12-05 22:56:48 +01:00
|
|
|
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_wood,
|
2016-12-05 21:27:37 +01:00
|
|
|
furnace_burntime = 38,
|
|
|
|
},
|
2016-12-08 05:26:38 +01:00
|
|
|
["all_faces_pine_tree"] = {
|
2016-12-05 21:27:37 +01:00
|
|
|
description = S("All-faces Pine Tree"),
|
|
|
|
tiles = {"default_pine_tree_top.png"},
|
2016-12-05 22:56:48 +01:00
|
|
|
groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
|
2016-12-05 21:27:37 +01:00
|
|
|
sounds = sound_wood,
|
|
|
|
furnace_burntime = 26,
|
|
|
|
},
|
|
|
|
["all_faces_acacia_tree"] = {
|
|
|
|
description = S("All-faces Acacia Tree"),
|
|
|
|
tiles = {"default_acacia_tree_top.png"},
|
2016-12-05 22:56:48 +01:00
|
|
|
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
2016-12-05 21:27:37 +01:00
|
|
|
sounds = sound_wood,
|
|
|
|
furnace_burntime = 34,
|
|
|
|
},
|
2016-12-08 05:26:38 +01:00
|
|
|
["all_faces_aspen_tree"] = {
|
2016-12-05 21:27:37 +01:00
|
|
|
description = S("All-faces Aspen Tree"),
|
|
|
|
tiles = {"default_aspen_tree_top.png"},
|
2016-12-05 22:56:48 +01:00
|
|
|
groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
|
2016-12-05 21:27:37 +01:00
|
|
|
sounds = sound_wood,
|
|
|
|
furnace_burntime = 22,
|
2014-03-09 10:38:18 +01:00
|
|
|
},
|
|
|
|
["glow_glass"] = {
|
|
|
|
description = S("Glow Glass"),
|
2015-01-23 18:52:02 +01:00
|
|
|
drawtype = "glasslike_framed_optional",
|
2017-12-29 23:41:17 +01:00
|
|
|
tiles = {"default_glass.png^[colorize:#E9CD61", "default_glass_detail.png^[colorize:#E9CD61"},
|
2014-03-09 10:38:18 +01:00
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2014-03-09 10:38:18 +01:00
|
|
|
light_source = 11,
|
2016-12-05 22:56:48 +01:00
|
|
|
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_glass,
|
|
|
|
},
|
|
|
|
["trap_glow_glass"] = {
|
|
|
|
description = S("Trap Glow Glass"),
|
2015-01-23 18:52:02 +01:00
|
|
|
drawtype = "glasslike_framed_optional",
|
2017-12-29 23:41:17 +01:00
|
|
|
tiles = {"default_glass.png^[colorize:#E9CD61^moreblocks_trap_box_glass.png", "default_glass_detail.png^[colorize:#E9CD61"},
|
2014-03-09 10:38:18 +01:00
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2014-03-09 10:38:18 +01:00
|
|
|
light_source = 11,
|
|
|
|
walkable = false,
|
2016-12-05 22:56:48 +01:00
|
|
|
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_glass,
|
|
|
|
no_stairs = true,
|
|
|
|
},
|
|
|
|
["super_glow_glass"] = {
|
|
|
|
description = S("Super Glow Glass"),
|
2015-01-23 18:52:02 +01:00
|
|
|
drawtype = "glasslike_framed_optional",
|
2017-12-29 23:41:17 +01:00
|
|
|
tiles = {"default_glass.png^[colorize:#FFFF78", "default_glass_detail.png^[colorize:#FFFF78"},
|
2014-03-09 10:38:18 +01:00
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2016-12-05 22:56:48 +01:00
|
|
|
light_source = default.LIGHT_MAX,
|
|
|
|
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_glass,
|
|
|
|
},
|
|
|
|
["trap_super_glow_glass"] = {
|
|
|
|
description = S("Trap Super Glow Glass"),
|
2015-01-23 18:52:02 +01:00
|
|
|
drawtype = "glasslike_framed_optional",
|
2017-12-29 23:41:17 +01:00
|
|
|
tiles = {"default_glass.png^[colorize:#FFFF78^moreblocks_trap_box_glass.png", "default_glass_detail.png^[colorize:#FFFF78"},
|
2014-03-09 10:38:18 +01:00
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2016-12-05 22:56:48 +01:00
|
|
|
light_source = default.LIGHT_MAX,
|
2014-03-09 10:38:18 +01:00
|
|
|
walkable = false,
|
2016-12-05 22:56:48 +01:00
|
|
|
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_glass,
|
|
|
|
no_stairs = true,
|
|
|
|
},
|
|
|
|
["rope"] = {
|
|
|
|
description = S("Rope"),
|
|
|
|
drawtype = "signlike",
|
|
|
|
inventory_image = "moreblocks_rope.png",
|
|
|
|
wield_image = "moreblocks_rope.png",
|
|
|
|
paramtype = "light",
|
2014-05-07 21:32:54 +02:00
|
|
|
sunlight_propagates = true,
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2014-03-09 10:38:18 +01:00
|
|
|
paramtype2 = "wallmounted",
|
|
|
|
walkable = false,
|
|
|
|
climbable = true,
|
2014-05-07 21:32:54 +02:00
|
|
|
selection_box = {type = "wallmounted",},
|
|
|
|
groups = {snappy = 3, flammable = 2},
|
2014-03-09 10:38:18 +01:00
|
|
|
sounds = sound_leaves,
|
|
|
|
no_stairs = true,
|
|
|
|
},
|
2016-05-19 00:02:28 +02:00
|
|
|
["copperpatina"] = {
|
|
|
|
description = S("Copper Patina Block"),
|
|
|
|
groups = {cracky = 1, level = 2},
|
2016-12-05 21:27:37 +01:00
|
|
|
is_ground_content = false,
|
2016-12-03 18:53:07 +01:00
|
|
|
sounds = sound_metal,
|
2016-05-19 00:02:28 +02:00
|
|
|
},
|
2014-03-09 10:38:18 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
for name, def in pairs(nodes) do
|
2014-07-21 12:24:49 +02:00
|
|
|
def.tiles = def.tiles or {"moreblocks_" ..name.. ".png"}
|
|
|
|
minetest.register_node("moreblocks:" ..name, def)
|
|
|
|
minetest.register_alias(name, "moreblocks:" ..name)
|
2019-02-25 11:20:35 +01:00
|
|
|
|
|
|
|
def_copy = table.copy(def)
|
|
|
|
|
|
|
|
-- Use the primary tile for all sides of cut glasslike nodes.
|
|
|
|
-- This makes them easier to see
|
|
|
|
if
|
|
|
|
#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 10:38:18 +01:00
|
|
|
if not def.no_stairs then
|
|
|
|
local groups = {}
|
|
|
|
for k, v in pairs(def.groups) do groups[k] = v end
|
2014-07-21 12:24:49 +02:00
|
|
|
stairsplus:register_all("moreblocks", name, "moreblocks:" ..name, {
|
2014-03-09 10:38:18 +01: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",
|
|
|
|
})
|