diff options
| author | Vanessa <vanessa@rainbird.(none)> | 2013-03-23 20:55:01 -0400 | 
|---|---|---|
| committer | Vanessa <vanessa@rainbird.(none)> | 2013-03-23 20:59:48 -0400 | 
| commit | 501b4c0d2b6e24e4b2196c947feaa43a7f820842 (patch) | |
| tree | 17077578e735f9c39b88fb3222cea83742561328 | |
| parent | 195e2f22298eeb633372812433129202a2f8c9e3 (diff) | |
Screwdriver tool is obsolete now, deleted.
| -rw-r--r-- | technic/init.lua | 1 | ||||
| -rw-r--r-- | technic/init.lua~ | 92 | ||||
| -rw-r--r-- | technic/screwdriver.lua | 47 | 
3 files changed, 92 insertions, 48 deletions
| 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"} -            } -    }) | 
