mtimer/init.lua

37 lines
955 B
Lua
Raw Normal View History

2019-02-16 16:45:32 +01:00
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
2019-02-16 16:45:32 +01:00
2019-02-22 20:33:42 +01:00
-- Set initial global `mtimer` table
--
-- @see ./system/formspec/formspec_creation.lua
-- @see ./system/load_configuration.lua
2019-02-16 16:45:32 +01:00
mtimer = {
translator = minetest.get_translator('mtimer'),
dialog = {},
meta = {}
2019-02-16 16:45:32 +01:00
}
-- 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
2019-02-22 20:33:42 +01: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')
dofile(syspath..'update_timer.lua')
-- Load player-related functionality
dofile(syspath..'chat_command.lua')
dofile(syspath..'on_joinplayer.lua')
dofile(syspath..'register_globalstep.lua')