From 501b4c0d2b6e24e4b2196c947feaa43a7f820842 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 23 Mar 2013 20:55:01 -0400 Subject: [PATCH] Screwdriver tool is obsolete now, deleted. --- technic/init.lua | 1 - technic/init.lua~ | 92 +++++++++++++++++++++++++++++++++++++++++ technic/screwdriver.lua | 47 --------------------- 3 files changed, 92 insertions(+), 48 deletions(-) create mode 100644 technic/init.lua~ delete mode 100644 technic/screwdriver.lua diff --git a/technic/init.lua b/technic/init.lua index 9b25ccf..a05fe3c 100644 --- a/technic/init.lua +++ b/technic/init.lua @@ -52,7 +52,6 @@ if enable_flashlight==true then dofile(modpath.."/flashlight.lua") end dofile(modpath.."/cans.lua") dofile(modpath.."/chainsaw.lua") dofile(modpath.."/tree_tap.lua") -dofile(modpath.."/screwdriver.lua") dofile(modpath.."/sonic_screwdriver.lua") -- mesecons and tubes related diff --git a/technic/init.lua~ b/technic/init.lua~ new file mode 100644 index 0000000..7b48f54 --- /dev/null +++ b/technic/init.lua~ @@ -0,0 +1,92 @@ +-- Minetest 0.4.4d1 : technic + +modpath=minetest.get_modpath("technic") + +--Read technic config file +dofile(modpath.."/config.lua") +--helper functions +dofile(modpath.."/helpers.lua") + +-- world gen +dofile(modpath.."/ores.lua") +if enable_rubber_tree_generation==true then dofile(modpath.."/rubber.lua") end + +-- chests +dofile(modpath.."/chest_commons.lua") +dofile(modpath.."/iron_chest.lua") +dofile(modpath.."/copper_chest.lua") +dofile(modpath.."/silver_chest.lua") +dofile(modpath.."/gold_chest.lua") +dofile(modpath.."/mithril_chest.lua") + +--items +dofile(modpath.."/concrete.lua") +dofile(modpath.."/items.lua") + +--LV machines +dofile(modpath.."/wires.lua") +dofile(modpath.."/battery_box.lua") +dofile(modpath.."/alloy_furnaces_commons.lua") +dofile(modpath.."/alloy_furnace.lua") +dofile(modpath.."/solar_panel.lua") +dofile(modpath.."/geothermal.lua") +dofile(modpath.."/water_mill.lua") +dofile(modpath.."/electric_furnace.lua") +dofile(modpath.."/tool_workshop.lua") +dofile(modpath.."/music_player.lua") +dofile(modpath.."/generator.lua") +dofile(modpath.."/grinder.lua") + +--MV machines +dofile(modpath.."/wires_mv.lua") +dofile(modpath.."/battery_box_mv.lua") +dofile(modpath.."/solar_panel_mv.lua") +dofile(modpath.."/electric_furnace_mv.lua") +dofile(modpath.."/alloy_furnace_mv.lua") +dofile(modpath.."/forcefield.lua") + +--Tools +if enable_mining_drill==true then dofile(modpath.."/mining_drill.lua") end +if enable_mining_laser==true then dofile(modpath.."/mining_laser_mk1.lua") end +if enable_flashlight==true then dofile(modpath.."/flashlight.lua") end +dofile(modpath.."/cans.lua") +dofile(modpath.."/chainsaw.lua") +dofile(modpath.."/tree_tap.lua") + +minetest.register_alias("technic:screwdriver", "screwdriver:screwdriver") + +dofile(modpath.."/sonic_screwdriver.lua") + +-- mesecons and tubes related +dofile(modpath.."/injector.lua") +dofile(modpath.."/node_breaker.lua") +dofile(modpath.."/deployer.lua") +dofile(modpath.."/constructor.lua") +dofile(modpath.."/frames.lua") + + +if enable_item_drop then dofile(modpath.."/item_drop.lua") end +if enable_item_pickup then dofile(modpath.."/item_pickup.lua") end + +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 diff --git a/technic/screwdriver.lua b/technic/screwdriver.lua deleted file mode 100644 index 0b81217..0000000 --- a/technic/screwdriver.lua +++ /dev/null @@ -1,47 +0,0 @@ - minetest.register_tool("technic:screwdriver", { - description = "Screwdriver", - inventory_image = "technic_screwdriver.png", - on_use = function(itemstack, user, pointed_thing) - -- Must be pointing to facedir applicable node - if pointed_thing.type~="node" then return end - local pos=minetest.get_pointed_thing_position(pointed_thing,above) - local node=minetest.env:get_node(pos) - local node_name=node.name - if minetest.registered_nodes[node_name].paramtype2 == "facedir" or minetest.registered_nodes[node_name].paramtype2 == "wallmounted" then - if node.param2==nil then return end - -- Get ready to set the param2 - local n = node.param2 - if minetest.registered_nodes[node_name].paramtype2 == "facedir" then - n = n+1 - if n == 4 then n = 0 end - else - n = n+1 - if n == 6 then n = 0 end - end - -- hacky_swap_node, unforunatly. - local meta = minetest.env:get_meta(pos) - local meta0 = meta:to_table() - node.param2 = n - minetest.env:set_node(pos,node) - meta = minetest.env:get_meta(pos) - meta:from_table(meta0) - local item=itemstack:to_table() - local item_wear=tonumber((item["wear"])) - item_wear=item_wear+819 - if item_wear>65535 then itemstack:clear() return itemstack end - item["wear"]=tostring(item_wear) - itemstack:replace(item) - return itemstack - else - return itemstack - end - end, - }) - - minetest.register_craft({ - output = "technic:screwdriver", - recipe = { - {"technic:stainless_steel_ingot"}, - {"default:stick"} - } - })