2015-01-12 00:21:33 +03:00
|
|
|
--[[
|
2015-01-12 19:46:22 +03:00
|
|
|
More Blocks: slab definitions
|
2015-01-12 00:21:33 +03:00
|
|
|
|
2019-02-25 14:13:55 +03:00
|
|
|
Copyright © 2011-2019 Hugo Locurcio and contributors.
|
2015-01-12 00:21:33 +03:00
|
|
|
Licensed under the zlib license. See LICENSE.md for more information.
|
|
|
|
--]]
|
|
|
|
|
2014-03-09 13:38:18 +04:00
|
|
|
-- Node will be called <modname>:slab_<subname>
|
2013-07-11 22:33:02 +04:00
|
|
|
|
2019-03-09 03:57:50 +03:00
|
|
|
-- luacheck: no unused
|
|
|
|
local function register_slab(modname, subname, recipeitem, groups, images, description, drop, light)
|
2015-11-01 19:54:29 +03:00
|
|
|
stairsplus:register_slab(modname, subname, recipeitem, {
|
2014-03-09 13:38:18 +04:00
|
|
|
groups = groups,
|
2013-07-11 22:33:02 +04:00
|
|
|
tiles = images,
|
2014-03-09 13:38:18 +04:00
|
|
|
description = description,
|
|
|
|
drop = drop,
|
2013-07-11 22:33:02 +04:00
|
|
|
light_source = light,
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
2014-03-09 13:38:18 +04:00
|
|
|
end
|
2013-07-11 22:33:02 +04:00
|
|
|
|
2016-10-03 13:14:34 +03:00
|
|
|
function stairsplus:register_slab_alias(modname_old, subname_old, modname_new, subname_new)
|
2018-03-03 18:42:46 +03:00
|
|
|
local defs = table.copy(stairsplus.defs["slab"])
|
2016-10-03 13:14:34 +03:00
|
|
|
for alternate, def in pairs(defs) do
|
|
|
|
minetest.register_alias(modname_old .. ":slab_" .. subname_old .. alternate, modname_new .. ":slab_" .. subname_new .. alternate)
|
|
|
|
end
|
|
|
|
end
|
2015-11-01 19:54:29 +03:00
|
|
|
|
2016-10-03 13:14:34 +03:00
|
|
|
function stairsplus:register_slab_alias_force(modname_old, subname_old, modname_new, subname_new)
|
2018-03-03 18:42:46 +03:00
|
|
|
local defs = table.copy(stairsplus.defs["slab"])
|
2016-10-03 13:14:34 +03:00
|
|
|
for alternate, def in pairs(defs) do
|
|
|
|
minetest.register_alias_force(modname_old .. ":slab_" .. subname_old .. alternate, modname_new .. ":slab_" .. subname_new .. alternate)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function stairsplus:register_slab(modname, subname, recipeitem, fields)
|
2018-03-03 18:42:46 +03:00
|
|
|
local defs = table.copy(stairsplus.defs["slab"])
|
2017-02-22 00:58:40 +03:00
|
|
|
for alternate, shape in pairs(defs) do
|
2018-03-03 22:15:09 +03:00
|
|
|
stairsplus.register_single("slab", alternate, shape, modname, subname, recipeitem, fields)
|
2014-03-09 13:38:18 +04:00
|
|
|
end
|
2013-07-11 22:33:02 +04:00
|
|
|
|
2015-11-01 19:54:29 +03:00
|
|
|
circular_saw.known_nodes[recipeitem] = {modname, subname}
|
2013-09-15 16:52:18 +04:00
|
|
|
end
|