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