2014-06-27 22:14:08 +04:00
|
|
|
local default_nodes = { -- Default stairs/slabs/panels/microblocks:
|
2014-03-09 13:38:18 +04:00
|
|
|
"stone",
|
|
|
|
"cobble",
|
|
|
|
"mossycobble",
|
|
|
|
"brick",
|
|
|
|
"sandstone",
|
|
|
|
"steelblock",
|
|
|
|
"goldblock",
|
|
|
|
"copperblock",
|
|
|
|
"bronzeblock",
|
|
|
|
"diamondblock",
|
|
|
|
"desert_stone",
|
2014-06-27 22:14:08 +04:00
|
|
|
-- "desert_cobble",
|
2014-03-09 13:38:18 +04:00
|
|
|
"glass",
|
|
|
|
"tree",
|
|
|
|
"wood",
|
|
|
|
"jungletree",
|
|
|
|
"junglewood",
|
|
|
|
"obsidian",
|
|
|
|
"obsidian_glass",
|
|
|
|
"stonebrick",
|
|
|
|
"desert_stonebrick",
|
|
|
|
"sandstonebrick",
|
|
|
|
}
|
|
|
|
|
|
|
|
for _, name in pairs(default_nodes) do
|
2014-06-27 22:14:08 +04:00
|
|
|
local nodename = "default:" .. name
|
2014-03-09 13:38:18 +04:00
|
|
|
local ndef = minetest.registered_nodes[nodename]
|
|
|
|
local groups = {}
|
2014-05-10 22:35:40 +04:00
|
|
|
for k, v in pairs(ndef.groups)
|
2014-06-27 22:14:08 +04:00
|
|
|
-- Ignore wood and stone groups to not make them usable in crafting:
|
2014-05-10 23:25:10 +04:00
|
|
|
do if k ~= "wood" and k ~= "stone" then
|
2014-05-10 22:35:40 +04:00
|
|
|
groups[k] = v
|
|
|
|
end
|
|
|
|
end
|
2014-03-09 13:38:18 +04:00
|
|
|
local drop
|
|
|
|
if type(ndef.drop) == "string" then
|
|
|
|
drop = ndef.drop:sub(9)
|
|
|
|
end
|
|
|
|
stairsplus:register_all("moreblocks", name, nodename, {
|
|
|
|
description = ndef.description,
|
|
|
|
drop = drop,
|
|
|
|
groups = groups,
|
|
|
|
sounds = ndef.sounds,
|
|
|
|
tiles = ndef.tiles,
|
2014-05-04 20:52:24 +04:00
|
|
|
sunlight_propagates = true,
|
2014-03-09 13:38:18 +04:00
|
|
|
})
|
|
|
|
end
|
|
|
|
|