| | |
| | | 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", |
| | |
| | | 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) |
| | |
| | | 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'}, |
| | | } |
| | | }) |
| | | |
| | |
| | | -- Nothing sawed down |
| | | return remaining_charge |
| | | end |
| | | |