init.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. --- Worldedit.
  2. -- @module worldedit
  3. -- @release 1.2
  4. -- @copyright 2013 sfan5, Anthony Zhang (Uberi/Temperest), and Brett O'Donnell (cornernote).
  5. -- @license GNU Affero General Public License version 3 (AGPLv3)
  6. -- @author sfan5
  7. -- @author Anthony Zang (Uberi/Temperest)
  8. -- @author Bret O'Donnel (cornernote)
  9. -- @author ShadowNinja
  10. worldedit = {}
  11. local ver = {major=1, minor=2}
  12. worldedit.version = ver
  13. worldedit.version_string = string.format("%d.%d", ver.major, ver.minor)
  14. local path = minetest.get_modpath(minetest.get_current_modname())
  15. local function load_module(path)
  16. local file = io.open(path, "r")
  17. if not file then return end
  18. file:close()
  19. return dofile(path)
  20. end
  21. dofile(path .. "/common.lua")
  22. load_module(path .. "/manipulations.lua")
  23. load_module(path .. "/primitives.lua")
  24. load_module(path .. "/visualization.lua")
  25. load_module(path .. "/serialization.lua")
  26. load_module(path .. "/code.lua")
  27. load_module(path .. "/compatibility.lua")
  28. load_module(path .. "/cuboid.lua")
  29. if minetest.settings:get_bool("log_mods") then
  30. print("[WorldEdit] Loaded!")
  31. end