2018-05-08 00:18:34 -07:00
|
|
|
|
|
|
|
local MP = minetest.get_modpath("xp_redo")
|
2018-07-04 08:08:50 -07:00
|
|
|
|
2018-11-09 01:17:55 -08:00
|
|
|
|
2018-07-04 08:08:50 -07:00
|
|
|
xp_redo = {
|
|
|
|
-- nametag display (player:set_nametag_attributes)
|
|
|
|
disable_nametag = minetest.settings:get_bool("xp.display_nametag"),
|
2018-05-08 00:18:34 -07:00
|
|
|
|
2018-07-04 08:08:50 -07:00
|
|
|
-- rank entity on top of player
|
2020-04-29 23:49:15 -07:00
|
|
|
disable_hover_entity = minetest.settings:get_bool("xp.disable_hover_entity"),
|
2018-07-31 02:29:39 -07:00
|
|
|
|
2019-05-27 05:36:47 -07:00
|
|
|
-- various different xp rewards per ore
|
|
|
|
enable_dignode_rewards = minetest.settings:get_bool("xp.enable_dignode_rewards"),
|
|
|
|
|
2019-08-17 14:43:07 -07:00
|
|
|
-- xp penalty on player death
|
|
|
|
enable_death_malus = minetest.settings:get_bool("xp.enable_death_malus", true),
|
|
|
|
|
2021-02-07 02:32:41 -08:00
|
|
|
-- digging rate limiter
|
|
|
|
limit_dig_rate = tonumber(minetest.settings:get("xp.limit_dig_rate")),
|
|
|
|
|
2018-07-31 02:29:39 -07:00
|
|
|
hud = {
|
|
|
|
posx = tonumber(minetest.settings:get("xp.hud.offsetx") or 0.8),
|
|
|
|
posy = tonumber(minetest.settings:get("xp.hud.offsety") or 0.7)
|
2020-06-22 23:11:09 -07:00
|
|
|
},
|
|
|
|
|
|
|
|
HUD_DISPLAY_STATE_NAME = "hud_state"
|
2018-07-04 08:08:50 -07:00
|
|
|
}
|
2018-05-08 00:18:34 -07:00
|
|
|
|
2020-01-24 01:43:11 -08:00
|
|
|
-- optional mapserver-bridge stuff below
|
2021-05-31 00:53:20 -07:00
|
|
|
local http = minetest.global_exists("QoS") and QoS(minetest.request_http_api(), 2) or minetest.request_http_api()
|
2020-01-24 01:43:11 -08:00
|
|
|
|
2020-12-10 05:31:38 -08:00
|
|
|
dofile(MP.."/utils.lua")
|
2019-12-16 03:50:59 -08:00
|
|
|
dofile(MP.."/hooks.lua")
|
2018-05-08 00:39:19 -07:00
|
|
|
dofile(MP.."/ranks.lua")
|
2018-07-06 04:21:57 -07:00
|
|
|
dofile(MP.."/json.lua") --json export
|
2018-07-04 08:08:50 -07:00
|
|
|
|
2020-01-24 08:32:11 -08:00
|
|
|
if http then
|
2021-05-31 00:53:20 -07:00
|
|
|
print("Enabling discord webhook for XP-Redo")
|
|
|
|
local webhook = dofile(MP.."/webhook.lua")
|
|
|
|
webhook(http)
|
2020-01-24 08:32:11 -08:00
|
|
|
end
|
2018-07-04 08:08:50 -07:00
|
|
|
|
2020-01-24 08:32:11 -08:00
|
|
|
if not xp_redo.disable_hover_entity then
|
2018-07-04 08:08:50 -07:00
|
|
|
dofile(MP.."/entities.lua")
|
|
|
|
end
|
|
|
|
|
2019-06-12 06:05:10 -07:00
|
|
|
dofile(MP.."/privs.lua")
|
2018-09-14 06:07:33 -07:00
|
|
|
dofile(MP.."/stats.lua")
|
2018-05-08 01:37:26 -07:00
|
|
|
dofile(MP.."/hud.lua")
|
2018-05-08 01:08:29 -07:00
|
|
|
dofile(MP.."/functions.lua")
|
2018-11-12 00:01:30 -08:00
|
|
|
dofile(MP.."/globalstep.lua")
|
2018-05-09 00:38:04 -07:00
|
|
|
dofile(MP.."/xpgate.lua")
|
2018-05-10 06:32:59 -07:00
|
|
|
dofile(MP.."/mobs.lua")
|
2018-05-25 05:05:16 -07:00
|
|
|
dofile(MP.."/highscore.lua")
|
|
|
|
dofile(MP.."/chatcmd.lua")
|
2018-05-22 10:59:36 -07:00
|
|
|
dofile(MP.."/builtin.lua")
|
2018-11-09 01:17:55 -08:00
|
|
|
dofile(MP.."/protector.lua")
|
2018-05-10 06:32:59 -07:00
|
|
|
|
2019-11-07 02:29:33 -08:00
|
|
|
if minetest.get_modpath("areas") then
|
|
|
|
dofile(MP.."/areas.lua")
|
|
|
|
end
|
|
|
|
|
2019-11-07 02:01:02 -08:00
|
|
|
if minetest.settings:get_bool("enable_xp_redo_integration_test") then
|
2021-05-31 00:53:20 -07:00
|
|
|
dofile(MP.."/integration_test.lua")
|
2019-11-07 02:01:02 -08:00
|
|
|
end
|
|
|
|
|
2018-05-08 00:18:34 -07:00
|
|
|
print("[OK] XP-Redo")
|