2015-01-24 19:35:56 +01:00
|
|
|
--[[
|
|
|
|
More Blocks: registrations
|
|
|
|
|
|
|
|
Copyright (c) 2011-2015 Calinou and contributors.
|
|
|
|
Licensed under the zlib license. See LICENSE.md for more information.
|
|
|
|
--]]
|
|
|
|
|
2014-10-28 18:01:32 +01:00
|
|
|
local default_nodes = { -- Default stairs/slabs/panels/microblocks:
|
|
|
|
"stone",
|
|
|
|
"cobble",
|
|
|
|
"mossycobble",
|
|
|
|
"brick",
|
|
|
|
"sandstone",
|
|
|
|
"steelblock",
|
|
|
|
"goldblock",
|
|
|
|
"copperblock",
|
|
|
|
"bronzeblock",
|
|
|
|
"diamondblock",
|
|
|
|
"desert_stone",
|
2015-01-24 20:18:48 +01:00
|
|
|
"desert_cobble",
|
2015-10-11 16:16:22 +02:00
|
|
|
"meselamp",
|
2014-10-28 18:01:32 +01:00
|
|
|
"glass",
|
|
|
|
"tree",
|
|
|
|
"wood",
|
|
|
|
"jungletree",
|
|
|
|
"junglewood",
|
2015-10-11 16:16:22 +02:00
|
|
|
"pine_tree",
|
|
|
|
"pine_wood",
|
|
|
|
"cherry_tree",
|
|
|
|
"cherry_plank",
|
|
|
|
"acacia_tree",
|
|
|
|
"acacia_wood",
|
2014-10-28 18:01:32 +01:00
|
|
|
"obsidian",
|
|
|
|
"obsidian_glass",
|
|
|
|
"stonebrick",
|
|
|
|
"desert_stonebrick",
|
|
|
|
"sandstonebrick",
|
2015-10-11 16:16:22 +02:00
|
|
|
"obsidianbrick",
|
2014-10-28 18:01:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
for _, name in pairs(default_nodes) do
|
|
|
|
local nodename = "default:" .. name
|
|
|
|
local ndef = minetest.registered_nodes[nodename]
|
2015-03-21 17:33:52 +01:00
|
|
|
if ndef then
|
|
|
|
local drop
|
|
|
|
if type(ndef.drop) == "string" then
|
2015-08-22 11:19:37 +02:00
|
|
|
drop = ndef.drop:split(" ")[1]:sub(9)
|
2015-03-21 17:33:52 +01:00
|
|
|
end
|
2016-04-15 22:34:00 +02:00
|
|
|
|
|
|
|
local tiles = ndef.tiles
|
|
|
|
if #ndef.tiles > 1 and ndef.drawtype:find("glass") then
|
|
|
|
tiles = { ndef.tiles[1] }
|
|
|
|
end
|
|
|
|
|
2015-03-21 17:33:52 +01:00
|
|
|
stairsplus:register_all("moreblocks", name, nodename, {
|
|
|
|
description = ndef.description,
|
|
|
|
drop = drop,
|
2015-11-13 19:11:45 +01:00
|
|
|
groups = ndef.groups,
|
2015-03-21 17:33:52 +01:00
|
|
|
sounds = ndef.sounds,
|
2016-04-15 22:34:00 +02:00
|
|
|
tiles = tiles,
|
2015-03-21 17:33:52 +01:00
|
|
|
sunlight_propagates = true,
|
2015-10-11 16:16:22 +02:00
|
|
|
light_source = ndef.light_source
|
2015-03-21 17:33:52 +01:00
|
|
|
})
|
2014-10-28 18:01:32 +01:00
|
|
|
end
|
|
|
|
end
|