mirror of
https://gitlab.com/4w/mtimer.git
synced 2024-11-24 16:23:44 +01:00
37 lines
955 B
Lua
37 lines
955 B
Lua
local modpath = minetest.get_modpath('mtimer')..DIR_DELIM
|
|
local syspath = modpath..'system'..DIR_DELIM
|
|
local fspath = syspath..'formspecs'..DIR_DELIM
|
|
local get_dir_list = minetest.get_dir_list
|
|
|
|
-- Set initial global `mtimer` table
|
|
--
|
|
-- @see ./system/formspec/formspec_creation.lua
|
|
-- @see ./system/load_configuration.lua
|
|
mtimer = {
|
|
translator = minetest.get_translator('mtimer'),
|
|
dialog = {},
|
|
meta = {}
|
|
}
|
|
|
|
|
|
-- Load configuration
|
|
dofile(syspath..'load_configuration.lua')
|
|
|
|
|
|
-- Load formspec-related files
|
|
dofile(syspath..'formspec_helpers.lua')
|
|
dofile(syspath..'on_receive_fields.lua')
|
|
for _,f in pairs(get_dir_list(fspath, false)) do dofile(fspath..f) end
|
|
|
|
|
|
-- Load timer actions
|
|
dofile(syspath..'get_times.lua')
|
|
dofile(syspath..'get_timer_data.lua')
|
|
dofile(syspath..'update_timer.lua')
|
|
|
|
|
|
-- Load player-related functionality
|
|
dofile(syspath..'chat_command.lua')
|
|
dofile(syspath..'on_joinplayer.lua')
|
|
dofile(syspath..'register_globalstep.lua')
|