-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
56 lines (45 loc) · 1.54 KB
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
local MP = minetest.get_modpath("mapblock_lib")
mapblock_lib = {
schema_path = minetest.get_worldpath() .. "/mapblocks",
mapgens = {},
version = 2
}
-- secure/insecure environment
local global_env = _G
local ie = minetest.request_insecure_environment and minetest.request_insecure_environment()
if ie then
minetest.log("action", "[mapsync] using insecure environment")
-- register insecure environment
global_env = ie
end
-- create global schema_path
minetest.mkdir(mapblock_lib.schema_path)
dofile(MP .. "/privs.lua")
dofile(MP .. "/util.lua")
dofile(MP .. "/pointed.lua")
dofile(MP .. "/pos.lua")
dofile(MP .. "/data.lua")
dofile(MP .. "/mapblock.lua")
dofile(MP .. "/transform/transform.lua")
dofile(MP .. "/transform/transform_set_param2.lua")
dofile(MP .. "/transform/transform_replace.lua")
dofile(MP .. "/transform/transform_flip.lua")
dofile(MP .. "/transform/transform_orient.lua")
dofile(MP .. "/transform/transform_transpose.lua")
dofile(MP .. "/serialize_mapblock.lua")
dofile(MP .. "/deserialize_mapblock.lua")
dofile(MP .. "/deserialize.lua")
dofile(MP .. "/get_catalog.lua")
loadfile(MP.."/create_catalog.lua")(global_env)
dofile(MP .. "/display.lua")
dofile(MP .. "/chatcommands/single.lua")
dofile(MP .. "/chatcommands/multi.lua")
dofile(MP .. "/mapgens/singleblock.lua")
if minetest.get_modpath("mtt") then
dofile(MP .. "/chatcommands/multi.spec.lua")
dofile(MP .. "/deserialize_mapblock.spec.lua")
dofile(MP .. "/util.spec.lua")
dofile(MP .. "/data.spec.lua")
dofile(MP .. "/catalog.spec.lua")
dofile(MP .. "/serialize.spec.lua")
end