2015-01-11 22:21:33 +01:00
|
|
|
--[[
|
2015-01-12 17:46:22 +01:00
|
|
|
More Blocks: registrations
|
2015-01-11 22:21:33 +01:00
|
|
|
|
|
|
|
Copyright (c) 2011-2015 Calinou and contributors.
|
|
|
|
Licensed under the zlib license. See LICENSE.md for more information.
|
|
|
|
--]]
|
|
|
|
|
2014-06-27 20:14:08 +02:00
|
|
|
local default_nodes = { -- Default stairs/slabs/panels/microblocks:
|
2014-03-09 10:38:18 +01:00
|
|
|
"stone",
|
|
|
|
"cobble",
|
|
|
|
"mossycobble",
|
|
|
|
"brick",
|
|
|
|
"sandstone",
|
|
|
|
"steelblock",
|
|
|
|
"goldblock",
|
|
|
|
"copperblock",
|
|
|
|
"bronzeblock",
|
|
|
|
"diamondblock",
|
|
|
|
"desert_stone",
|
2014-10-28 22:12:40 +01:00
|
|
|
"desert_cobble",
|
2015-06-17 17:18:17 +02:00
|
|
|
"meselamp",
|
2014-03-09 10:38:18 +01:00
|
|
|
"glass",
|
|
|
|
"tree",
|
|
|
|
"wood",
|
|
|
|
"jungletree",
|
|
|
|
"junglewood",
|
2015-08-24 19:37:20 +02:00
|
|
|
"pine_tree",
|
|
|
|
"pine_wood",
|
|
|
|
"acacia_tree",
|
|
|
|
"acacia_wood",
|
2014-03-09 10:38:18 +01:00
|
|
|
"obsidian",
|
|
|
|
"obsidian_glass",
|
|
|
|
"stonebrick",
|
|
|
|
"desert_stonebrick",
|
|
|
|
"sandstonebrick",
|
2015-06-15 22:04:58 +02:00
|
|
|
"obsidianbrick",
|
2014-03-09 10:38:18 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
for _, name in pairs(default_nodes) do
|
2014-06-27 20:14:08 +02:00
|
|
|
local nodename = "default:" .. name
|
2014-03-09 10:38:18 +01:00
|
|
|
local ndef = minetest.registered_nodes[nodename]
|
2015-02-11 17:59:28 +01:00
|
|
|
if ndef then
|
|
|
|
local groups = {}
|
|
|
|
for k, v in pairs(ndef.groups)
|
|
|
|
-- Ignore wood and stone groups to not make them usable in crafting:
|
|
|
|
do if k ~= "wood" and k ~= "stone" then
|
|
|
|
groups[k] = v
|
|
|
|
end
|
2014-05-10 20:35:40 +02:00
|
|
|
end
|
2015-02-11 17:59:28 +01: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,
|
|
|
|
sunlight_propagates = true,
|
2015-07-05 10:15:25 +02:00
|
|
|
light_source = ndef.light_source
|
2015-02-11 17:59:28 +01:00
|
|
|
})
|
2014-05-10 20:35:40 +02:00
|
|
|
end
|
2014-03-09 10:38:18 +01:00
|
|
|
end
|