forked from mtcontrib/Minetest-WorldEdit
More speedups for //hollowsphere, //sphere, //hollowdome, //dome, //cylinder, better module loader, fix message in //volume.
This commit is contained in:
@ -1,9 +1,15 @@
|
||||
local path = minetest.get_modpath(minetest.get_current_modname())
|
||||
|
||||
local loadmodule = function(path)
|
||||
return pcall(function()
|
||||
local results = {pcall(function()
|
||||
return dofile(path)
|
||||
end)
|
||||
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
|
||||
end
|
||||
|
||||
loadmodule(path .. "/manipulations.lua")
|
||||
|
Reference in New Issue
Block a user