RealBadAngel
2013-03-30 279776ff62951a8a9ab96b86b03b7558e77a1c87
commit | author | age
279776 1 -- Minetest 0.4.6 : 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 -- chests
11 dofile(modpath.."/chest_commons.lua")
12 dofile(modpath.."/iron_chest.lua")
13 dofile(modpath.."/copper_chest.lua")
14 dofile(modpath.."/silver_chest.lua")
15 dofile(modpath.."/gold_chest.lua")
16 dofile(modpath.."/mithril_chest.lua")
17
18 --items 
19 dofile(modpath.."/concrete.lua")
20 dofile(modpath.."/items.lua")
21
22 --LV machines
612349 23 dofile(modpath.."/wires.lua")
R 24 dofile(modpath.."/battery_box.lua")
5d799e 25 dofile(modpath.."/alloy_furnaces_commons.lua")
82cba9 26 dofile(modpath.."/alloy_furnace.lua")
R 27 dofile(modpath.."/solar_panel.lua")
28 dofile(modpath.."/geothermal.lua")
29 dofile(modpath.."/water_mill.lua")
30 dofile(modpath.."/electric_furnace.lua")
31 dofile(modpath.."/tool_workshop.lua")
32 dofile(modpath.."/music_player.lua")
33 dofile(modpath.."/generator.lua")
34 dofile(modpath.."/grinder.lua")
35
36 --MV machines
37 dofile(modpath.."/wires_mv.lua")
38 dofile(modpath.."/battery_box_mv.lua")
612349 39 dofile(modpath.."/solar_panel_mv.lua")
061e6b 40 dofile(modpath.."/electric_furnace_mv.lua")
5d799e 41 dofile(modpath.."/alloy_furnace_mv.lua")
c6da0a 42 dofile(modpath.."/forcefield.lua")
82cba9 43
R 44 --Tools
45 if enable_mining_drill==true then dofile(modpath.."/mining_drill.lua") end
46 if enable_mining_laser==true then dofile(modpath.."/mining_laser_mk1.lua") end
47 if enable_flashlight==true then dofile(modpath.."/flashlight.lua") end
48 dofile(modpath.."/cans.lua")
49 dofile(modpath.."/chainsaw.lua")
50 dofile(modpath.."/tree_tap.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")
478407 58 dofile(modpath.."/frames.lua")
R 59
82cba9 60
R 61 if enable_item_drop    then dofile(modpath.."/item_drop.lua") end
62 if enable_item_pickup   then dofile(modpath.."/item_pickup.lua") end
63
64 function has_locked_chest_privilege(meta, player)
65     if player:get_player_name() ~= meta:get_string("owner") then
66         return false
67     end
68     return true
69 end
70
71
72 function hacky_swap_node(pos,name)
73     local node = minetest.env:get_node(pos)
74     local meta = minetest.env:get_meta(pos)
75     local meta0 = meta:to_table()
76     if node.name == name then
77         return nil
78     end
79     node.name = name
80     local meta0 = meta:to_table()
81     minetest.env:set_node(pos,node)
82     meta = minetest.env:get_meta(pos)
83     meta:from_table(meta0)
84     return 1
85 end