1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-26 18:50:38 +01:00
server-nalc/mods/moreblocks/stairsplus/registrations.lua

61 lines
1.2 KiB
Lua
Raw Normal View History

--[[
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",
2014-10-28 18:01:32 +01:00
"glass",
"tree",
"wood",
"jungletree",
"junglewood",
"pinetree",
"pinewood",
2014-10-28 18:01:32 +01:00
"obsidian",
"obsidian_glass",
"stonebrick",
"desert_stonebrick",
"sandstonebrick",
}
for _, name in pairs(default_nodes) do
local nodename = "default:" .. name
local ndef = minetest.registered_nodes[nodename]
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-10-28 18:01:32 +01:00
end
local drop
if type(ndef.drop) == "string" then
drop = ndef.drop:split(" ")[1]: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,
})
2014-10-28 18:01:32 +01:00
end
end