| | |
| | | |
| | | -- The default trees |
| | | local timber_nodenames = { |
| | | ["default:jungletree"] = true, |
| | | ["default:papyrus"] = true, |
| | | ["default:cactus"] = true, |
| | | ["default:tree"] = true, |
| | | ["default:apple"] = true, |
| | | ["default:pinetree"] = true, |
| | | ["default:acacia_tree"] = true, |
| | | ["default:aspen_tree"] = true, |
| | | ["default:jungletree"] = true, |
| | | ["default:papyrus"] = true, |
| | | ["default:cactus"] = true, |
| | | ["default:tree"] = true, |
| | | ["default:apple"] = true, |
| | | ["default:pine_tree"] = true, |
| | | } |
| | | |
| | | if chainsaw_leaves then |
| | | timber_nodenames["default:acacia_leaves"] = true |
| | | timber_nodenames["default:aspen_leaves"] = true |
| | | timber_nodenames["default:leaves"] = true |
| | | timber_nodenames["default:jungleleaves"] = true |
| | | timber_nodenames["default:pine_needles"] = true |
| | |
| | | -- Send current charge to digging function so that the |
| | | -- chainsaw will stop after digging a number of nodes |
| | | meta.charge = chainsaw_dig(pointed_thing.under, meta.charge) |
| | | |
| | | technic.set_RE_wear(itemstack, meta.charge, chainsaw_max_charge) |
| | | itemstack:set_metadata(minetest.serialize(meta)) |
| | | if not technic.creative_mode then |
| | | technic.set_RE_wear(itemstack, meta.charge, chainsaw_max_charge) |
| | | itemstack:set_metadata(minetest.serialize(meta)) |
| | | end |
| | | return itemstack |
| | | end, |
| | | }) |
| | |
| | | output = "technic:chainsaw", |
| | | recipe = { |
| | | {"technic:stainless_steel_ingot", trigger, "technic:battery"}, |
| | | {"technic:fine_copper_wire", "technic:motor", "technic:battery"}, |
| | | {"basic_materials:copper_wire", "basic_materials:motor", "technic:battery"}, |
| | | {"", "", "technic:stainless_steel_ingot"}, |
| | | } |
| | | }, |
| | | replacements = { {"basic_materials:copper_wire", "basic_materials:empty_spool"}, }, |
| | | |
| | | }) |
| | | |