2019-02-16 16:45:32 +01:00
|
|
|
local modpath = minetest.get_modpath('mtimer')..DIR_DELIM
|
|
|
|
local syspath = modpath..'system'..DIR_DELIM
|
2021-04-02 09:16:47 +02:00
|
|
|
local fspath = syspath..'formspecs'..DIR_DELIM
|
2021-10-09 05:25:41 +02:00
|
|
|
|
2019-02-16 16:45:32 +01:00
|
|
|
|
2019-02-22 20:33:42 +01:00
|
|
|
-- Set initial global `mtimer` table
|
|
|
|
--
|
2021-10-09 05:25:41 +02:00
|
|
|
-- The sub tables are filesd programmatically.
|
|
|
|
--
|
|
|
|
-- @see ./system/formspecs/*
|
2020-08-16 00:13:24 +02:00
|
|
|
-- @see ./system/load_configuration.lua
|
2019-02-16 16:45:32 +01:00
|
|
|
mtimer = {
|
2020-08-16 00:13:24 +02:00
|
|
|
translator = minetest.get_translator('mtimer'),
|
2019-03-06 18:22:50 +01:00
|
|
|
dialog = {},
|
2020-08-16 00:13:24 +02:00
|
|
|
meta = {}
|
2019-02-16 16:45:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-08-16 00:13:24 +02:00
|
|
|
-- Load configuration
|
|
|
|
dofile(syspath..'load_configuration.lua')
|
|
|
|
|
|
|
|
|
2021-04-02 09:16:47 +02:00
|
|
|
-- Load formspec-related files
|
|
|
|
dofile(syspath..'formspec_helpers.lua')
|
|
|
|
dofile(syspath..'on_receive_fields.lua')
|
2021-10-09 05:25:41 +02:00
|
|
|
for _,f in pairs(minetest.get_dir_list(fspath, false)) do dofile(fspath..f) end
|
2019-02-21 21:07:35 +01:00
|
|
|
|
2019-02-22 20:33:42 +01:00
|
|
|
|
2021-04-02 09:16:47 +02:00
|
|
|
-- Load timer actions
|
2019-02-21 14:37:58 +01:00
|
|
|
dofile(syspath..'get_times.lua')
|
2019-02-22 14:08:44 +01:00
|
|
|
dofile(syspath..'get_timer_data.lua')
|
2021-04-02 09:16:47 +02:00
|
|
|
dofile(syspath..'update_timer.lua')
|
|
|
|
|
|
|
|
|
|
|
|
-- Load player-related functionality
|
|
|
|
dofile(syspath..'chat_command.lua')
|
|
|
|
dofile(syspath..'on_joinplayer.lua')
|
2019-02-22 15:50:32 +01:00
|
|
|
dofile(syspath..'register_globalstep.lua')
|