2014-10-29 22:47:08 -04:00
|
|
|
--- Worldedit.
|
|
|
|
-- @module worldedit
|
|
|
|
-- @release 1.1
|
|
|
|
-- @copyright 2013 sfan5, Anthony Zhang (Uberi/Temperest), and Brett O'Donnell (cornernote).
|
|
|
|
-- @license GNU Affero General Public License version 3 (AGPLv3)
|
|
|
|
-- @author sfan5
|
|
|
|
-- @author Anthony Zang (Uberi/Temperest)
|
|
|
|
-- @author Bret O'Donnel (cornernote)
|
|
|
|
-- @author ShadowNinja
|
2013-12-10 01:47:32 -05:00
|
|
|
|
2014-10-29 22:47:08 -04:00
|
|
|
worldedit = {}
|
|
|
|
worldedit.version = {1, 1, major=1, minor=1}
|
|
|
|
worldedit.version_string = table.concat(worldedit.version, ".")
|
|
|
|
|
|
|
|
if not minetest.get_voxel_manip then
|
|
|
|
local err_msg = "This version of WorldEdit requires Minetest 0.4.8 or later! You have an old version."
|
|
|
|
minetest.log("error", string.rep("#", 128))
|
|
|
|
minetest.log("error", err_msg)
|
|
|
|
minetest.log("error", string.rep("#", 128))
|
|
|
|
error(err_msg)
|
|
|
|
end
|
2013-08-06 16:28:05 -04:00
|
|
|
|
2013-05-18 19:00:12 -04:00
|
|
|
local path = minetest.get_modpath(minetest.get_current_modname())
|
2013-03-20 17:31:00 -04:00
|
|
|
|
2014-10-29 22:47:08 -04:00
|
|
|
local function load_module(path)
|
2015-05-16 19:26:37 -04:00
|
|
|
local file = io.open(path, "r")
|
2014-10-29 22:47:08 -04:00
|
|
|
if not file then return end
|
2013-07-31 22:15:52 -04:00
|
|
|
file:close()
|
|
|
|
return dofile(path)
|
2013-03-20 17:31:00 -04:00
|
|
|
end
|
|
|
|
|
2014-10-29 22:47:08 -04:00
|
|
|
dofile(path .. "/common.lua")
|
|
|
|
load_module(path .. "/manipulations.lua")
|
|
|
|
load_module(path .. "/primitives.lua")
|
|
|
|
load_module(path .. "/visualization.lua")
|
|
|
|
load_module(path .. "/serialization.lua")
|
|
|
|
load_module(path .. "/code.lua")
|
|
|
|
load_module(path .. "/compatibility.lua")
|
2016-01-17 13:27:33 -05:00
|
|
|
load_module(path .. "/wand.lua")
|
2014-10-29 22:47:08 -04:00
|
|
|
|
|
|
|
|
|
|
|
if minetest.setting_getbool("log_mods") then
|
|
|
|
print("[WorldEdit] Loaded!")
|
|
|
|
end
|
2013-08-28 20:28:49 -04:00
|
|
|
|