2015-01-11 13:21:33 -08:00
|
|
|
--[[
|
2015-01-12 08:46:22 -08:00
|
|
|
More Blocks: registrations
|
2015-01-11 13:21:33 -08:00
|
|
|
|
2017-02-19 04:35:16 -08:00
|
|
|
Copyright (c) 2011-2017 Hugo Locurcio and contributors.
|
2015-01-11 13:21:33 -08:00
|
|
|
Licensed under the zlib license. See LICENSE.md for more information.
|
|
|
|
--]]
|
|
|
|
|
2014-06-27 11:14:08 -07:00
|
|
|
local default_nodes = { -- Default stairs/slabs/panels/microblocks:
|
2014-03-09 01:38:18 -08:00
|
|
|
"stone",
|
|
|
|
"cobble",
|
|
|
|
"mossycobble",
|
|
|
|
"brick",
|
|
|
|
"sandstone",
|
|
|
|
"steelblock",
|
|
|
|
"goldblock",
|
|
|
|
"copperblock",
|
|
|
|
"bronzeblock",
|
|
|
|
"diamondblock",
|
|
|
|
"desert_stone",
|
2014-10-28 14:12:40 -07:00
|
|
|
"desert_cobble",
|
2015-06-17 08:18:17 -07:00
|
|
|
"meselamp",
|
2014-03-09 01:38:18 -08:00
|
|
|
"glass",
|
|
|
|
"tree",
|
|
|
|
"wood",
|
|
|
|
"jungletree",
|
|
|
|
"junglewood",
|
2015-08-24 10:37:20 -07:00
|
|
|
"pine_tree",
|
|
|
|
"pine_wood",
|
|
|
|
"acacia_tree",
|
|
|
|
"acacia_wood",
|
2016-06-10 10:47:18 -07:00
|
|
|
"aspen_tree",
|
|
|
|
"aspen_wood",
|
2014-03-09 01:38:18 -08:00
|
|
|
"obsidian",
|
|
|
|
"obsidian_glass",
|
|
|
|
"stonebrick",
|
|
|
|
"desert_stonebrick",
|
|
|
|
"sandstonebrick",
|
2015-06-15 13:04:58 -07:00
|
|
|
"obsidianbrick",
|
2014-03-09 01:38:18 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
for _, name in pairs(default_nodes) do
|
2014-06-27 11:14:08 -07:00
|
|
|
local nodename = "default:" .. name
|
2014-03-09 01:38:18 -08:00
|
|
|
local ndef = minetest.registered_nodes[nodename]
|
2015-02-11 08:59:28 -08:00
|
|
|
if ndef then
|
|
|
|
local drop
|
|
|
|
if type(ndef.drop) == "string" then
|
|
|
|
drop = ndef.drop:sub(9)
|
|
|
|
end
|
2016-02-19 13:31:12 -08:00
|
|
|
|
|
|
|
local tiles = ndef.tiles
|
|
|
|
if #ndef.tiles > 1 and ndef.drawtype:find("glass") then
|
|
|
|
tiles = { ndef.tiles[1] }
|
|
|
|
end
|
|
|
|
|
2015-02-11 08:59:28 -08:00
|
|
|
stairsplus:register_all("moreblocks", name, nodename, {
|
|
|
|
description = ndef.description,
|
|
|
|
drop = drop,
|
2015-11-01 08:54:29 -08:00
|
|
|
groups = ndef.groups,
|
2015-02-11 08:59:28 -08:00
|
|
|
sounds = ndef.sounds,
|
2016-02-19 13:31:12 -08:00
|
|
|
tiles = tiles,
|
2015-02-11 08:59:28 -08:00
|
|
|
sunlight_propagates = true,
|
2015-07-05 01:15:25 -07:00
|
|
|
light_source = ndef.light_source
|
2015-02-11 08:59:28 -08:00
|
|
|
})
|
2014-05-10 11:35:40 -07:00
|
|
|
end
|
2014-03-09 01:38:18 -08:00
|
|
|
end
|