]> git.lizzy.rs Git - worldedit.git/blobdiff - worldedit/init.lua
Change compatibility notices.
[worldedit.git] / worldedit / init.lua
index 18e3490b70f9b9d50bd7b25e1fa6e60860cb7c49..a4b1e5f087f0406c7d78a87c02cabca33873494f 100644 (file)
@@ -1,15 +1,14 @@
+assert(minetest.get_voxel_manip, string.rep(">", 300) .. "HEY YOU! YES, YOU OVER THERE. THIS VERSION OF WORLDEDIT REQUIRES MINETEST 0.4.7-DEV OR NEWER! MINETEST 0.4.7-STABLE WILL NOT WORK! YOU HAVE AN OLD VERSION." .. string.rep("<", 300))\r
+\r
 local path = minetest.get_modpath(minetest.get_current_modname())\r
 \r
 local loadmodule = function(path)\r
-       local results = {pcall(function()\r
-               return dofile(path)\r
-       end)}\r
-       if results[1] then --successfully loaded module\r
-               table.remove(results, 1) --remove status indicator\r
-               return unpack(results) --return all results\r
-       else --load error\r
-               print(results[2])\r
+       local file = io.open(path)\r
+       if not file then\r
+               return\r
        end\r
+       file:close()\r
+       return dofile(path)\r
 end\r
 \r
 loadmodule(path .. "/manipulations.lua")\r
@@ -18,4 +17,5 @@ loadmodule(path .. "/visualization.lua")
 loadmodule(path .. "/serialization.lua")\r
 loadmodule(path .. "/code.lua")\r
 loadmodule(path .. "/compatibility.lua")\r
-loadmodule(path .. "/queue.lua")\r
+\r
+print("[MOD] WorldEdit loaded!")\r