minetest-mods/xdecor/init.lua

34 lines
740 B
Lua
Raw Normal View History

2019-12-14 17:47:31 +01:00
--local t = os.clock()
xdecor = {}
local modpath = minetest.get_modpath("xdecor")
2021-05-15 22:34:12 +02:00
dofile(modpath .. "/handlers/animations.lua")
dofile(modpath .. "/handlers/helpers.lua")
dofile(modpath .. "/handlers/nodeboxes.lua")
dofile(modpath .. "/handlers/registration.lua")
2019-12-14 17:47:31 +01:00
2021-05-15 22:34:12 +02:00
dofile(modpath .. "/src/nodes.lua")
dofile(modpath .. "/src/recipes.lua")
2019-12-14 17:47:31 +01:00
local subpart = {
"chess",
"cooking",
"enchanting",
"hive",
"itemframe",
"mailbox",
"mechanisms",
"rope",
2021-05-15 22:34:12 +02:00
"workbench",
2019-12-14 17:47:31 +01:00
}
2021-05-15 22:34:12 +02:00
for _, name in ipairs(subpart) do
local enable = minetest.settings:get_bool("enable_xdecor_" .. name)
2019-12-14 17:47:31 +01:00
if enable or enable == nil then
2021-05-15 22:34:12 +02:00
dofile(modpath .. "/src/" .. name .. ".lua")
2019-12-14 17:47:31 +01:00
end
end
--print(string.format("[xdecor] loaded in %.2f ms", (os.clock()-t)*1000))