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 |
|
9f0b41
|
5 |
technic = 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 |
be2f30
|
19 |
if intllib then |
S |
20 |
technic.getter = intllib.Getter() |
|
21 |
else |
|
22 |
technic.getter = function(s) return s end |
|
23 |
end |
|
24 |
local S = technic.getter |
82cba9
|
25 |
|
ee0765
|
26 |
-- Read configuration file |
82cba9
|
27 |
dofile(modpath.."/config.lua") |
ee0765
|
28 |
|
S |
29 |
-- Helper functions |
e23f87
|
30 |
dofile(modpath.."/helpers.lua") |
82cba9
|
31 |
|
ee0765
|
32 |
-- Items |
82cba9
|
33 |
dofile(modpath.."/items.lua") |
R |
34 |
|
ee0765
|
35 |
-- Craft recipes for items |
S |
36 |
dofile(modpath.."/crafts.lua") |
|
37 |
|
ee5c6c
|
38 |
-- Register functions |
ee0765
|
39 |
dofile(modpath.."/register.lua") |
ee5c6c
|
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 |
|
37c06a
|
50 |
if minetest.setting_getbool("log_mods") then |
be2f30
|
51 |
print(S("[Technic] Loaded in %f seconds"):format(os.clock() - load_start)) |
ee0765
|
52 |
end |
S |
53 |
|