-
Notifications
You must be signed in to change notification settings - Fork 11
/
init.lua
67 lines (50 loc) · 1.74 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
local MP = minetest.get_modpath("xp_redo")
xp_redo = {
-- nametag display (player:set_nametag_attributes)
disable_nametag = minetest.settings:get_bool("xp.display_nametag"),
-- rank entity on top of player
disable_hover_entity = minetest.settings:get_bool("xp.disable_hover_entity"),
-- various different xp rewards per ore
enable_dignode_rewards = minetest.settings:get_bool("xp.enable_dignode_rewards"),
-- xp penalty on player death
enable_death_malus = minetest.settings:get_bool("xp.enable_death_malus", true),
-- digging rate limiter
limit_dig_rate = tonumber(minetest.settings:get("xp.limit_dig_rate")),
hud = {
posx = tonumber(minetest.settings:get("xp.hud.offsetx") or 0.8),
posy = tonumber(minetest.settings:get("xp.hud.offsety") or 0.7)
},
HUD_DISPLAY_STATE_NAME = "hud_state"
}
-- optional mapserver-bridge stuff below
local http = minetest.global_exists("QoS") and QoS(minetest.request_http_api(), 2) or minetest.request_http_api()
dofile(MP.."/utils.lua")
dofile(MP.."/hooks.lua")
dofile(MP.."/ranks.lua")
dofile(MP.."/json.lua") --json export
if http then
print("Enabling discord webhook for XP-Redo")
local webhook = dofile(MP.."/webhook.lua")
webhook(http)
end
if not xp_redo.disable_hover_entity then
dofile(MP.."/entities.lua")
end
dofile(MP.."/privs.lua")
dofile(MP.."/stats.lua")
dofile(MP.."/hud.lua")
dofile(MP.."/functions.lua")
dofile(MP.."/globalstep.lua")
dofile(MP.."/xpgate.lua")
dofile(MP.."/mobs.lua")
dofile(MP.."/highscore.lua")
dofile(MP.."/chatcmd.lua")
dofile(MP.."/builtin.lua")
dofile(MP.."/protector.lua")
if minetest.get_modpath("areas") then
dofile(MP.."/areas.lua")
end
if minetest.settings:get_bool("enable_xp_redo_integration_test") then
dofile(MP.."/integration_test.lua")
end
print("[OK] XP-Redo")