forked from mt-mods/jumpdrive
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.lua
88 lines (68 loc) · 2.21 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
jumpdrive = {
config = {
-- allowed radius
max_radius = tonumber(minetest.settings:get("jumpdrive.max_radius")) or 15,
max_area_radius = tonumber(minetest.settings:get("jumpdrive.max_area_radius")) or 25,
-- max volume in nodes ( ((radius*2) + 1) ^ 3 )
max_area_volume = tonumber(minetest.settings:get("jumpdrive.max_area_volume")) or 29791,
-- base storage value
powerstorage = tonumber(minetest.settings:get("jumpdrive.powerstorage")) or 1000000,
-- base technic power requirement
powerrequirement = tonumber(minetest.settings:get("jumpdrive.power_requirement")) or 2500,
},
-- blacklisted nodes
blacklist = {}
}
jumpdrive.sounds = {}
if minetest.get_modpath("default") then
jumpdrive.sounds = default
end
if minetest.get_modpath("mcl_sounds") then
jumpdrive.sounds = mcl_sounds
end
local MP = minetest.get_modpath("jumpdrive")
if minetest.get_modpath("technic") then
dofile(MP.."/technic_run.lua")
end
-- common functions
dofile(MP.."/fuel.lua")
dofile(MP.."/upgrade.lua")
dofile(MP.."/bookmark.lua")
dofile(MP.."/infotext.lua")
dofile(MP.."/migrate.lua")
dofile(MP.."/hooks.lua")
dofile(MP.."/compat/compat.lua")
dofile(MP.."/is_area_empty.lua")
dofile(MP.."/is_area_protected.lua")
-- move logic
dofile(MP.."/move/move_objects.lua")
dofile(MP.."/move/move_mapdata.lua")
dofile(MP.."/move/move_metadata.lua")
dofile(MP.."/move/move_nodetimers.lua")
dofile(MP.."/move/move_players.lua")
dofile(MP.."/move/move.lua")
dofile(MP.."/mapgen.lua")
dofile(MP.."/common.lua")
dofile(MP.."/digiline.lua")
dofile(MP.."/backbone.lua")
dofile(MP.."/warp_device.lua")
dofile(MP.."/crafts.lua")
-- engine
dofile(MP.."/engine.lua")
dofile(MP.."/formspec.lua")
dofile(MP.."/jump.lua")
-- fleet
dofile(MP.."/fleet/fleet_functions.lua")
dofile(MP.."/fleet/fleet_digiline.lua")
dofile(MP.."/fleet/fleet_controller.lua")
dofile(MP.."/fleet/fleet_formspec.lua")
-- blacklist nodes
dofile(MP.."/blacklist.lua")
if minetest.get_modpath("monitoring") then
-- enable metrics
dofile(MP.."/metrics.lua")
end
if minetest.settings:get_bool("enable_jumpdrive_integration_test") then
dofile(MP.."/integration_test.lua")
end
print("[OK] Jumpdrive")