commit | author | age
|
3bc6ca
|
1 |
-- Minetest 0.4.7 mod: technic |
0ca19d
|
2 |
-- namespace: technic |
R |
3 |
-- (c) 2012-2013 by RealBadAngel <mk@realbadangel.pl> |
82cba9
|
4 |
|
85a984
|
5 |
local load_start = os.clock() |
S |
6 |
|
49e82a
|
7 |
technic = rawget(_G, "technic") or {} |
97e1c8
|
8 |
technic.creative_mode = minetest.settings:get_bool("creative_mode") |
8e03d7
|
9 |
|
049129
|
10 |
|
5d470c
|
11 |
local modpath = minetest.get_modpath("technic") |
S |
12 |
technic.modpath = modpath |
|
13 |
|
85a984
|
14 |
|
0a5e52
|
15 |
-- Boilerplate to support intllib |
85a984
|
16 |
if rawget(_G, "intllib") then |
4b1798
|
17 |
technic.getter = intllib.Getter() |
E |
18 |
else |
|
19 |
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 |
|
20 |
end |
|
21 |
local S = technic.getter |
82cba9
|
22 |
|
ee0765
|
23 |
-- Read configuration file |
82cba9
|
24 |
dofile(modpath.."/config.lua") |
ee0765
|
25 |
|
S |
26 |
-- Helper functions |
e23f87
|
27 |
dofile(modpath.."/helpers.lua") |
82cba9
|
28 |
|
ee0765
|
29 |
-- Items |
82cba9
|
30 |
dofile(modpath.."/items.lua") |
R |
31 |
|
ee0765
|
32 |
-- Craft recipes for items |
S |
33 |
dofile(modpath.."/crafts.lua") |
|
34 |
|
ee5c6c
|
35 |
-- Register functions |
ee0765
|
36 |
dofile(modpath.."/register.lua") |
ee5c6c
|
37 |
|
1da213
|
38 |
-- Radiation |
S |
39 |
dofile(modpath.."/radiation.lua") |
|
40 |
|
5d470c
|
41 |
-- Machines |
S |
42 |
dofile(modpath.."/machines/init.lua") |
82cba9
|
43 |
|
d49742
|
44 |
-- Tools |
S |
45 |
dofile(modpath.."/tools/init.lua") |
|
46 |
|
ee0765
|
47 |
-- Aliases for legacy node/item names |
S |
48 |
dofile(modpath.."/legacy.lua") |
82cba9
|
49 |
|
97e1c8
|
50 |
if minetest.settings:get_bool("log_mods") then |
be2f30
|
51 |
print(S("[Technic] Loaded in %f seconds"):format(os.clock() - load_start)) |
ee0765
|
52 |
end |
S |
53 |
|