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 |
|
49e82a
|
5 |
technic = rawget(_G, "technic") or {} |
8e03d7
|
6 |
|
049129
|
7 |
technic.tube_inject_item = pipeworks.tube_inject_item or function (pos, start_pos, velocity, item) |
Z |
8 |
local tubed = pipeworks.tube_item(vector.new(pos), item) |
|
9 |
tubed:get_luaentity().start_pos = vector.new(start_pos) |
|
10 |
tubed:setvelocity(velocity) |
|
11 |
tubed:setacceleration(vector.new(0, 0, 0)) |
|
12 |
end |
|
13 |
|
ee0765
|
14 |
local load_start = os.clock() |
5d470c
|
15 |
local modpath = minetest.get_modpath("technic") |
S |
16 |
technic.modpath = modpath |
|
17 |
|
0a5e52
|
18 |
-- Boilerplate to support intllib |
41a10a
|
19 |
local S = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end |
T |
20 |
technic.getter = S |
82cba9
|
21 |
|
ee0765
|
22 |
-- Read configuration file |
82cba9
|
23 |
dofile(modpath.."/config.lua") |
ee0765
|
24 |
|
S |
25 |
-- Helper functions |
e23f87
|
26 |
dofile(modpath.."/helpers.lua") |
82cba9
|
27 |
|
ee0765
|
28 |
-- Items |
82cba9
|
29 |
dofile(modpath.."/items.lua") |
R |
30 |
|
ee0765
|
31 |
-- Craft recipes for items |
S |
32 |
dofile(modpath.."/crafts.lua") |
|
33 |
|
ee5c6c
|
34 |
-- Register functions |
ee0765
|
35 |
dofile(modpath.."/register.lua") |
ee5c6c
|
36 |
|
5d470c
|
37 |
-- Machines |
S |
38 |
dofile(modpath.."/machines/init.lua") |
82cba9
|
39 |
|
d49742
|
40 |
-- Tools |
S |
41 |
dofile(modpath.."/tools/init.lua") |
|
42 |
|
ee0765
|
43 |
-- Aliases for legacy node/item names |
S |
44 |
dofile(modpath.."/legacy.lua") |
82cba9
|
45 |
|
37c06a
|
46 |
if minetest.setting_getbool("log_mods") then |
be2f30
|
47 |
print(S("[Technic] Loaded in %f seconds"):format(os.clock() - load_start)) |
ee0765
|
48 |
end |
S |
49 |
|