ShadowNinja
2013-07-08 19c9a0443b17176a27329b69ee16fe28d7be6fd8
technic/chainsaw.lua
@@ -3,7 +3,7 @@
local chainsaw_charge_per_node = 12    -- 12    - Gives 2500 nodes on a single charge (about 50 complete normal trees)
local chainsaw_leaves          = true  -- true  - Cut down entire trees, leaves and all
register_power_tool ("technic:chainsaw",chainsaw_max_charge)
technic.register_LV_power_tool ("technic:chainsaw",chainsaw_max_charge)
minetest.register_tool("technic:chainsaw", {
        description = "Chainsaw",
@@ -20,7 +20,7 @@
                        if charge < chainsaw_charge_per_node then return end -- only cut if charged
                        charge=chainsaw_dig_it(minetest.get_pointed_thing_position(pointed_thing, above),user,charge)
                        set_RE_wear(item,charge,chainsaw_max_charge)
                        technic.set_RE_wear(item,charge,chainsaw_max_charge)
                        meta["charge"]=charge
                        item["metadata"]=set_item_meta(meta)
                        itemstack:replace(item)
@@ -33,8 +33,8 @@
        output = 'technic:chainsaw',
        recipe = {
                {'technic:stainless_steel_ingot', 'technic:stainless_steel_ingot', 'technic:battery'},
                {'technic:stainless_steel_ingot', 'technic:motor', 'technic:battery'},
                {'','','default:copper_ingot'},
                {'technic:stainless_steel_ingot', 'technic:motor',                 'technic:battery'},
                {'',                               '',                             'default:copper_ingot'},
        }
})
@@ -266,3 +266,4 @@
        -- Nothing sawed down
        return remaining_charge
end