2014-10-30 03:47:08 +01:00
|
|
|
--- Worldedit.
|
|
|
|
-- @module worldedit
|
2017-09-12 14:25:38 +02:00
|
|
|
-- @release 1.2
|
2014-10-30 03:47:08 +01:00
|
|
|
-- @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 07:47:32 +01:00
|
|
|
|
2017-09-12 14:25:38 +02:00
|
|
|
|
2014-10-30 03:47:08 +01:00
|
|
|
worldedit = {}
|
2017-09-12 14:25:38 +02:00
|
|
|
|
|
|
|
local ver = {major=1, minor=2}
|
|
|
|
worldedit.version = ver
|
|
|
|
worldedit.version_string = string.format("%d.%d", ver.major, ver.minor)
|
2014-10-30 03:47:08 +01:00
|
|
|
|
|
|
|
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 22:28:05 +02:00
|
|
|
|
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
|
|
|
|
2014-10-30 03:47:08 +01:00
|
|
|
local function load_module(path)
|
2015-05-17 01:26:37 +02:00
|
|
|
local file = io.open(path, "r")
|
2014-10-30 03:47:08 +01:00
|
|
|
if not file then return end
|
2013-08-01 04:15:52 +02:00
|
|
|
file:close()
|
|
|
|
return dofile(path)
|
2013-03-20 22:31:00 +01:00
|
|
|
end
|
|
|
|
|
2014-10-30 03:47:08 +01: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-07-04 19:57:48 +02:00
|
|
|
load_module(path .. "/cuboid.lua")
|
2014-10-30 03:47:08 +01:00
|
|
|
|
|
|
|
|
2018-11-23 14:08:05 +01:00
|
|
|
if minetest.settings:get_bool("log_mods") then
|
2014-10-30 03:47:08 +01:00
|
|
|
print("[WorldEdit] Loaded!")
|
|
|
|
end
|
2013-08-29 02:28:49 +02:00
|
|
|
|