commit | author | age
|
82cba9
|
1 |
-- Minetest 0.4.4 : technic |
R |
2 |
|
|
3 |
modpath=minetest.get_modpath("technic") |
|
4 |
|
|
5 |
--Read technic config file |
|
6 |
dofile(modpath.."/config.lua") |
|
7 |
|
|
8 |
-- world gen |
|
9 |
dofile(modpath.."/ores.lua") |
|
10 |
if enable_rubber_tree_generation==true then dofile(modpath.."/rubber.lua") end |
|
11 |
|
|
12 |
-- chests |
|
13 |
dofile(modpath.."/chest_commons.lua") |
|
14 |
dofile(modpath.."/iron_chest.lua") |
|
15 |
dofile(modpath.."/copper_chest.lua") |
|
16 |
dofile(modpath.."/silver_chest.lua") |
|
17 |
dofile(modpath.."/gold_chest.lua") |
|
18 |
dofile(modpath.."/mithril_chest.lua") |
|
19 |
|
|
20 |
--items |
|
21 |
dofile(modpath.."/concrete.lua") |
|
22 |
dofile(modpath.."/items.lua") |
|
23 |
|
|
24 |
--LV machines |
|
25 |
dofile(modpath.."/alloy_furnace.lua") |
|
26 |
dofile(modpath.."/solar_panel.lua") |
|
27 |
dofile(modpath.."/geothermal.lua") |
|
28 |
dofile(modpath.."/water_mill.lua") |
|
29 |
dofile(modpath.."/electric_furnace.lua") |
|
30 |
dofile(modpath.."/battery_box.lua") |
|
31 |
dofile(modpath.."/wires.lua") |
|
32 |
dofile(modpath.."/tool_workshop.lua") |
|
33 |
dofile(modpath.."/music_player.lua") |
|
34 |
dofile(modpath.."/generator.lua") |
|
35 |
dofile(modpath.."/grinder.lua") |
|
36 |
|
|
37 |
--MV machines |
|
38 |
dofile(modpath.."/wires_mv.lua") |
|
39 |
dofile(modpath.."/solar_panel_mv.lua") |
|
40 |
dofile(modpath.."/battery_box_mv.lua") |
061e6b
|
41 |
dofile(modpath.."/electric_furnace_mv.lua") |
82cba9
|
42 |
|
R |
43 |
--Tools |
|
44 |
if enable_mining_drill==true then dofile(modpath.."/mining_drill.lua") end |
|
45 |
if enable_mining_laser==true then dofile(modpath.."/mining_laser_mk1.lua") end |
|
46 |
if enable_flashlight==true then dofile(modpath.."/flashlight.lua") end |
|
47 |
dofile(modpath.."/cans.lua") |
|
48 |
dofile(modpath.."/chainsaw.lua") |
|
49 |
dofile(modpath.."/tree_tap.lua") |
|
50 |
dofile(modpath.."/screwdriver.lua") |
|
51 |
dofile(modpath.."/sonic_screwdriver.lua") |
|
52 |
|
|
53 |
-- mesecons and tubes related |
74cf47
|
54 |
dofile(modpath.."/injector.lua") |
82cba9
|
55 |
dofile(modpath.."/node_breaker.lua") |
061e6b
|
56 |
dofile(modpath.."/deployer.lua") |
82cba9
|
57 |
dofile(modpath.."/constructor.lua") |
R |
58 |
|
|
59 |
if enable_item_drop then dofile(modpath.."/item_drop.lua") end |
|
60 |
if enable_item_pickup then dofile(modpath.."/item_pickup.lua") end |
|
61 |
|
|
62 |
function has_locked_chest_privilege(meta, player) |
|
63 |
if player:get_player_name() ~= meta:get_string("owner") then |
|
64 |
return false |
|
65 |
end |
|
66 |
return true |
|
67 |
end |
|
68 |
|
|
69 |
|
|
70 |
function hacky_swap_node(pos,name) |
|
71 |
local node = minetest.env:get_node(pos) |
|
72 |
local meta = minetest.env:get_meta(pos) |
|
73 |
local meta0 = meta:to_table() |
|
74 |
if node.name == name then |
|
75 |
return nil |
|
76 |
end |
|
77 |
node.name = name |
|
78 |
local meta0 = meta:to_table() |
|
79 |
minetest.env:set_node(pos,node) |
|
80 |
meta = minetest.env:get_meta(pos) |
|
81 |
meta:from_table(meta0) |
|
82 |
return 1 |
|
83 |
end |