2013-07-17 19:14:01 +02:00
|
|
|
-- Minetest 0.4.7 mod: technic
|
2013-04-04 01:17:39 +02:00
|
|
|
-- namespace: technic
|
|
|
|
-- (c) 2012-2013 by RealBadAngel <mk@realbadangel.pl>
|
2013-01-27 14:03:46 +01:00
|
|
|
|
2016-03-12 13:28:01 -05:00
|
|
|
local load_start = os.clock()
|
|
|
|
|
2015-02-05 09:47:37 +01:00
|
|
|
technic = rawget(_G, "technic") or {}
|
2017-06-05 07:50:30 -07:00
|
|
|
technic.creative_mode = minetest.settings:get_bool("creative_mode")
|
2013-06-30 07:12:02 +02:00
|
|
|
|
2014-08-14 22:12:53 +01:00
|
|
|
|
2013-07-11 12:19:09 -04:00
|
|
|
local modpath = minetest.get_modpath("technic")
|
|
|
|
technic.modpath = modpath
|
|
|
|
|
2016-03-12 13:28:01 -05:00
|
|
|
|
2013-10-30 13:50:24 -04:00
|
|
|
-- Boilerplate to support intllib
|
2016-03-12 13:28:01 -05:00
|
|
|
if rawget(_G, "intllib") then
|
2015-02-08 13:45:13 +01:00
|
|
|
technic.getter = intllib.Getter()
|
|
|
|
else
|
|
|
|
technic.getter = function(s,a,...)if a==nil then return s end a={a,...}return s:gsub("(@?)@(%(?)(%d+)(%)?)",function(e,o,n,c)if e==""then return a[tonumber(n)]..(o==""and c or"")else return"@"..o..n..c end end) end
|
|
|
|
end
|
|
|
|
local S = technic.getter
|
2013-07-02 00:03:36 +02:00
|
|
|
|
2013-07-17 15:34:35 -04:00
|
|
|
-- Read configuration file
|
2013-01-27 14:03:46 +01:00
|
|
|
dofile(modpath.."/config.lua")
|
2013-07-17 15:34:35 -04:00
|
|
|
|
|
|
|
-- Helper functions
|
2013-02-21 22:01:49 +01:00
|
|
|
dofile(modpath.."/helpers.lua")
|
2013-01-27 14:03:46 +01:00
|
|
|
|
2013-07-17 15:34:35 -04:00
|
|
|
-- Items
|
2013-01-27 14:03:46 +01:00
|
|
|
dofile(modpath.."/items.lua")
|
|
|
|
|
2013-07-17 15:34:35 -04:00
|
|
|
-- Craft recipes for items
|
|
|
|
dofile(modpath.."/crafts.lua")
|
|
|
|
|
2013-07-02 00:03:36 +02:00
|
|
|
-- Register functions
|
2013-07-17 15:34:35 -04:00
|
|
|
dofile(modpath.."/register.lua")
|
2013-07-11 01:04:58 +02:00
|
|
|
|
2016-03-21 17:50:08 -04:00
|
|
|
-- Radiation
|
|
|
|
dofile(modpath.."/radiation.lua")
|
|
|
|
|
2013-07-11 12:19:09 -04:00
|
|
|
-- Machines
|
|
|
|
dofile(modpath.."/machines/init.lua")
|
2013-02-06 15:34:01 +01:00
|
|
|
|
2013-07-11 15:10:14 -04:00
|
|
|
-- Tools
|
|
|
|
dofile(modpath.."/tools/init.lua")
|
|
|
|
|
2013-07-17 15:34:35 -04:00
|
|
|
-- Aliases for legacy node/item names
|
|
|
|
dofile(modpath.."/legacy.lua")
|
|
|
|
|
2017-06-05 07:50:30 -07:00
|
|
|
if minetest.settings:get_bool("log_mods") then
|
2013-10-30 13:45:32 -04:00
|
|
|
print(S("[Technic] Loaded in %f seconds"):format(os.clock() - load_start))
|
2013-07-17 15:34:35 -04:00
|
|
|
end
|
|
|
|
|