3 local mver_major, mver_minor, mver_patch = 0, 4, 16 -- Minetest 0.4.16 minimum.
5 local client_version = minetest.get_version().string
6 local major, minor, patch = client_version:match("(%d+).(%d+).(%d+)")
8 if (major and minor and patch) and
9 ((tonumber(major) < mver_major) or
10 (mver_major == tonumber(major) and tonumber(minor) < mver_minor) or
11 (mver_minor == tonumber(minor) and tonumber(patch) < mver_patch)) then
12 minetest.log("error", "[xdecor] Your Minetest client is too old to run this mod. Disabling.")
17 local modpath = minetest.get_modpath("xdecor")
19 dofile(modpath.."/handlers/animations.lua")
20 dofile(modpath.."/handlers/helpers.lua")
21 dofile(modpath.."/handlers/nodeboxes.lua")
22 dofile(modpath.."/handlers/registration.lua")
24 dofile(modpath.."/src/alias.lua")
25 dofile(modpath.."/src/nodes.lua")
26 dofile(modpath.."/src/recipes.lua")
40 for _, name in pairs(subpart) do
41 local enable = minetest.settings:get_bool("enable_xdecor_"..name)
42 if enable or enable == nil then
43 dofile(modpath.."/src/"..name..".lua")
47 --print(string.format("[xdecor] loaded in %.2f ms", (os.clock()-t)*1000))