Jordan Snelling
2013-06-27 c687e8cb7b9e624474353b0cc10acc5db14192f8
commit | author | age
0ca19d 1 -- Minetest 0.4.6 mod: technic
R 2 -- namespace: technic
3 -- (c) 2012-2013 by RealBadAngel <mk@realbadangel.pl>
82cba9 4
R 5 modpath=minetest.get_modpath("technic")
6
7 --Read technic config file
8 dofile(modpath.."/config.lua")
e23f87 9 --helper functions
R 10 dofile(modpath.."/helpers.lua")
82cba9 11
R 12 --items 
13 dofile(modpath.."/items.lua")
14
15 --LV machines
612349 16 dofile(modpath.."/wires.lua")
R 17 dofile(modpath.."/battery_box.lua")
5d799e 18 dofile(modpath.."/alloy_furnaces_commons.lua")
82cba9 19 dofile(modpath.."/alloy_furnace.lua")
R 20 dofile(modpath.."/solar_panel.lua")
21 dofile(modpath.."/geothermal.lua")
22 dofile(modpath.."/water_mill.lua")
23 dofile(modpath.."/electric_furnace.lua")
24 dofile(modpath.."/tool_workshop.lua")
25 dofile(modpath.."/music_player.lua")
26 dofile(modpath.."/generator.lua")
27 dofile(modpath.."/grinder.lua")
28
29 --MV machines
30 dofile(modpath.."/wires_mv.lua")
31 dofile(modpath.."/battery_box_mv.lua")
612349 32 dofile(modpath.."/solar_panel_mv.lua")
061e6b 33 dofile(modpath.."/electric_furnace_mv.lua")
5d799e 34 dofile(modpath.."/alloy_furnace_mv.lua")
c6da0a 35 dofile(modpath.."/forcefield.lua")
82cba9 36
R 37 --Tools
38 if enable_mining_drill==true then dofile(modpath.."/mining_drill.lua") end
39 if enable_mining_laser==true then dofile(modpath.."/mining_laser_mk1.lua") end
40 if enable_flashlight==true then dofile(modpath.."/flashlight.lua") end
41 dofile(modpath.."/cans.lua")
42 dofile(modpath.."/chainsaw.lua")
43 dofile(modpath.."/tree_tap.lua")
44 dofile(modpath.."/sonic_screwdriver.lua")
45
46 -- mesecons and tubes related
74cf47 47 dofile(modpath.."/injector.lua")
82cba9 48 dofile(modpath.."/node_breaker.lua")
061e6b 49 dofile(modpath.."/deployer.lua")
82cba9 50 dofile(modpath.."/constructor.lua")
478407 51 dofile(modpath.."/frames.lua")
82cba9 52
R 53 function has_locked_chest_privilege(meta, player)
54     if player:get_player_name() ~= meta:get_string("owner") then
55         return false
56     end
57     return true
58 end
59
60
61 function hacky_swap_node(pos,name)
62     local node = minetest.env:get_node(pos)
63     local meta = minetest.env:get_meta(pos)
64     local meta0 = meta:to_table()
65     if node.name == name then
66         return nil
67     end
68     node.name = name
69     local meta0 = meta:to_table()
70     minetest.env:set_node(pos,node)
71     meta = minetest.env:get_meta(pos)
72     meta:from_table(meta0)
73     return 1
74 end