2013-05-19 01:00:12 +02:00
|
|
|
local path = minetest.get_modpath(minetest.get_current_modname())
|
2013-03-20 22:31:00 +01:00
|
|
|
|
|
|
|
local loadmodule = function(path)
|
2013-07-28 03:34:42 +02:00
|
|
|
local results = {pcall(function()
|
2013-07-21 22:54:25 +02:00
|
|
|
return dofile(path)
|
2013-07-28 03:34:42 +02:00
|
|
|
end)}
|
|
|
|
if results[1] then --successfully loaded module
|
|
|
|
table.remove(results, 1) --remove status indicator
|
|
|
|
return unpack(results) --return all results
|
|
|
|
else --load error
|
|
|
|
print(results[2])
|
|
|
|
end
|
2013-03-20 22:31:00 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
loadmodule(path .. "/manipulations.lua")
|
|
|
|
loadmodule(path .. "/primitives.lua")
|
|
|
|
loadmodule(path .. "/visualization.lua")
|
|
|
|
loadmodule(path .. "/serialization.lua")
|
|
|
|
loadmodule(path .. "/code.lua")
|
2013-04-28 19:08:09 +02:00
|
|
|
loadmodule(path .. "/compatibility.lua")
|
|
|
|
loadmodule(path .. "/queue.lua")
|