minetest-mm/mods/Minetest-WorldEdit/worldedit/init.lua

46 lines
1.3 KiB
Lua
Raw Normal View History

2021-01-31 19:04:53 +01:00
--- WorldEdit mod for the Minetest engine
2020-10-26 17:38:53 +01:00
-- @module worldedit
2021-01-31 19:04:53 +01:00
-- @release 1.3
-- @copyright 2012 sfan5, Anthony Zhang (Uberi/Temperest), and Brett O'Donnell (cornernote)
2020-10-26 17:38:53 +01:00
-- @license GNU Affero General Public License version 3 (AGPLv3)
-- @author sfan5
-- @author Anthony Zang (Uberi/Temperest)
-- @author Bret O'Donnel (cornernote)
-- @author ShadowNinja
worldedit = {}
2021-01-31 19:04:53 +01:00
local ver = {major=1, minor=3}
2020-10-26 17:38:53 +01:00
worldedit.version = ver
worldedit.version_string = string.format("%d.%d", ver.major, ver.minor)
local path = minetest.get_modpath(minetest.get_current_modname())
local function load_module(path)
local file = io.open(path, "r")
if not file then return end
file:close()
return dofile(path)
end
dofile(path .. "/common.lua")
load_module(path .. "/manipulations.lua")
load_module(path .. "/primitives.lua")
2024-12-19 12:55:40 +01:00
load_module(path .. "/transformations.lua")
2020-10-26 17:38:53 +01:00
load_module(path .. "/visualization.lua")
load_module(path .. "/serialization.lua")
load_module(path .. "/code.lua")
load_module(path .. "/compatibility.lua")
load_module(path .. "/cuboid.lua")
if minetest.settings:get_bool("log_mods") then
print("[WorldEdit] Loaded!")
end
2021-09-21 16:59:25 +02:00
if minetest.settings:get_bool("worldedit_run_tests") then
2024-12-19 12:55:40 +01:00
dofile(path .. "/test/init.lua")
2021-09-21 16:59:25 +02:00
minetest.after(0, worldedit.run_tests)
end