technic/init.lua

71 lines
3.1 KiB
Lua
Raw Normal View History

2012-09-22 07:34:33 +04:00
-- Minetest 0.4.3 : technic
2012-08-21 09:18:33 +04:00
minetest.register_alias("rebar", "technic:rebar")
minetest.register_alias("concrete", "technic:concrete")
minetest.register_alias("concrete_post", "technic:concrete_post")
minetest.register_alias("iron_chest", "technic:iron_chest")
minetest.register_alias("iron_locked_chest", "technic:iron_locked_chest")
minetest.register_alias("copper_chest", "technic:copper_chest")
minetest.register_alias("copper_locked_chest", "technic:copper_locked_chest")
minetest.register_alias("silver_chest", "technic:silver_chest")
minetest.register_alias("silver_locked_chest", "technic:silver_locked_chest")
minetest.register_alias("gold_chest", "technic:gold_chest")
minetest.register_alias("gold_locked_chest", "technic:gold_locked_chest")
minetest.register_alias("mithril_chest", "technic:mithril_chest")
minetest.register_alias("mithril_locked_chest", "technic:mithril_locked_chest")
dofile(minetest.get_modpath("technic").."/concrete.lua")
dofile(minetest.get_modpath("technic").."/iron_chest.lua")
dofile(minetest.get_modpath("technic").."/copper_chest.lua")
dofile(minetest.get_modpath("technic").."/silver_chest.lua")
dofile(minetest.get_modpath("technic").."/gold_chest.lua")
dofile(minetest.get_modpath("technic").."/mithril_chest.lua")
2012-09-12 01:27:24 +04:00
dofile(minetest.get_modpath("technic").."/electric_furnace.lua")
dofile(minetest.get_modpath("technic").."/battery_box.lua")
2012-08-21 09:18:33 +04:00
dofile(minetest.get_modpath("technic").."/wires.lua")
dofile(minetest.get_modpath("technic").."/dyes.lua")
dofile(minetest.get_modpath("technic").."/ores.lua")
dofile(minetest.get_modpath("technic").."/tool_workshop.lua")
dofile(minetest.get_modpath("technic").."/music_player.lua")
dofile(minetest.get_modpath("technic").."/grinder.lua")
dofile(minetest.get_modpath("technic").."/mining_laser_mk1.lua")
--dofile(minetest.get_modpath("technic").."/project_table.lua")
2012-09-22 07:34:33 +04:00
dofile(minetest.get_modpath("technic").."/injector.lua")
2012-09-02 07:46:20 +04:00
dofile(minetest.get_modpath("technic").."/generator.lua")
dofile(minetest.get_modpath("technic").."/solar_panel.lua")
2012-09-02 15:11:01 +04:00
dofile(minetest.get_modpath("technic").."/geothermal.lua")
2012-09-02 18:10:39 +04:00
dofile(minetest.get_modpath("technic").."/water_mill.lua")
2012-09-11 14:56:38 +04:00
dofile(minetest.get_modpath("technic").."/alloy_furnace.lua")
2012-09-11 15:57:16 +04:00
dofile(minetest.get_modpath("technic").."/items.lua")
2012-09-11 20:47:09 +04:00
dofile(minetest.get_modpath("technic").."/mining_drill.lua")
2012-09-12 02:48:51 +04:00
dofile(minetest.get_modpath("technic").."/screwdriver.lua")
2012-09-12 04:22:18 +04:00
dofile(minetest.get_modpath("technic").."/sonic_screwdriver.lua")
2012-09-22 07:34:33 +04:00
dofile(minetest.get_modpath("technic").."/node_breaker.lua")
2012-09-24 03:42:49 +04:00
dofile(minetest.get_modpath("technic").."/deployer.lua")
2012-10-06 03:36:41 +04:00
dofile(minetest.get_modpath("technic").."/rubber.lua")
2012-09-22 07:34:33 +04:00
dofile(minetest.get_modpath("technic").."/tree_tap.lua")
2012-08-21 09:18:33 +04:00
function has_locked_chest_privilege(meta, player)
if player:get_player_name() ~= meta:get_string("owner") then
return false
end
return true
end
function hacky_swap_node(pos,name)
local node = minetest.env:get_node(pos)
local meta = minetest.env:get_meta(pos)
local meta0 = meta:to_table()
if node.name == name then
return nil
end
node.name = name
local meta0 = meta:to_table()
minetest.env:set_node(pos,node)
meta = minetest.env:get_meta(pos)
meta:from_table(meta0)
return 1
end