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