diff options
-rw-r--r-- | worldedit/init.lua | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/worldedit/init.lua b/worldedit/init.lua index e4ac8f7..02c3494 100644 --- a/worldedit/init.lua +++ b/worldedit/init.lua @@ -1,15 +1,12 @@ local path = minetest.get_modpath(minetest.get_current_modname())
local loadmodule = function(path)
- local results = {pcall(function()
- return dofile(path)
- 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])
+ local file = io.open(path)
+ if not file then
+ return
end
+ file:close()
+ return dofile(path)
end
loadmodule(path .. "/manipulations.lua")
|