RealBadAngel
2013-01-27 e9050c43fd1c2d635006cb99800bbc7a2f52122c
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
808049 13 dofile(modpath.."/iron_chest.lua")
MK 14 dofile(modpath.."/copper_chest.lua")
15 dofile(modpath.."/silver_chest.lua")
16 dofile(modpath.."/gold_chest.lua")
17 dofile(modpath.."/mithril_chest.lua")
b8d776 18
R 19 --items 
20 dofile(modpath.."/concrete.lua")
21 dofile(modpath.."/items.lua")
22
23 --LV machines
24 dofile(modpath.."/alloy_furnace.lua")
808049 25 dofile(modpath.."/solar_panel.lua")
MK 26 dofile(modpath.."/geothermal.lua")
27 dofile(modpath.."/water_mill.lua")
b8d776 28 dofile(modpath.."/electric_furnace.lua")
R 29 dofile(modpath.."/battery_box.lua")
30 dofile(modpath.."/wires.lua")
31 dofile(modpath.."/tool_workshop.lua")
32 dofile(modpath.."/music_player.lua")
33 dofile(modpath.."/generator.lua")
34 dofile(modpath.."/grinder.lua")
167434 35
808049 36 --MV machines
b8d776 37 dofile(modpath.."/wires_mv.lua")
808049 38 dofile(modpath.."/solar_panel_mv.lua")
MK 39 dofile(modpath.."/battery_box_mv.lua")
167434 40
b8d776 41 --Tools
e7d3d7 42 if enable_mining_drill==true then dofile(modpath.."/mining_drill.lua") end
b8d776 43 if enable_mining_laser==true then dofile(modpath.."/mining_laser_mk1.lua") end
R 44 if enable_flashlight==true then dofile(modpath.."/flashlight.lua") end
45 dofile(modpath.."/cans.lua")
46 dofile(modpath.."/chainsaw.lua")
47 dofile(modpath.."/tree_tap.lua")
48 dofile(modpath.."/screwdriver.lua")
49 dofile(modpath.."/sonic_screwdriver.lua")
50
51 -- mesecons and tubes related
876218 52 --dofile(modpath.."/injector.lua")
b8d776 53 dofile(modpath.."/node_breaker.lua")
876218 54 --dofile(modpath.."/deployer.lua")
b8d776 55 dofile(modpath.."/constructor.lua")
R 56
57 if enable_item_drop    then dofile(modpath.."/item_drop.lua") end
58 if enable_item_pickup   then dofile(modpath.."/item_pickup.lua") end
167434 59
MK 60 function has_locked_chest_privilege(meta, player)
61     if player:get_player_name() ~= meta:get_string("owner") then
62         return false
63     end
64     return true
65 end
66
67
68 function hacky_swap_node(pos,name)
69     local node = minetest.env:get_node(pos)
70     local meta = minetest.env:get_meta(pos)
71     local meta0 = meta:to_table()
72     if node.name == name then
73         return nil
74     end
75     node.name = name
76     local meta0 = meta:to_table()
77     minetest.env:set_node(pos,node)
78     meta = minetest.env:get_meta(pos)
79     meta:from_table(meta0)
80     return 1
b8d776 81 end