-- download at MT.QZX.COM (trees.lua) local b = "a" -- chainsaw node breaker local d = "d" -- sapling deployer + chainsaw ejector local s = "b" -- on/off switch local tb = 15 -- duration between scans local tc = 5 -- duration after chopping function is_log(node) if node == "default:tree" then return true end -- default:acacia_tree -- floating logs if node == "default:aspen_tree" then return true end if node == "default:jungletree" then return true end if node == "default:pine_tree" then return true end -- ethereal:bamboo -- average sprout drop is too low -- ethereal:banana_trunk -- floating logs -- ethereal:big_tree_sapling -- log is default:tree if node == "ethereal:birch_trunk" then return true end if node == "ethereal:frost_tree" then return true end -- ethereal:orange_tree_sapling -- log is default:tree -- ethereal:palm_trunk -- floating logs -- ethereal:redwood_trunk -- destroys dirt block and machines -- if node == "ethereal:sakura_trunk" then return true end if node == "ethereal:willow_trunk" then return true end if node == "ethereal:yellow_trunk" then return true end if node == "moretrees:rubber_tree_trunk" then return true end -- illuna_ethereal:douglasie_trunk -- destroys dirt block -- illuna_ethereal:fierytree_trunk -- destroys dirt block and machines -- illuna_ethereal:fierytree_eyes -- secondary trunk node -- illuna_ethereal:iska_birch1_sapling -- destroys dirt block -- illuna_ethereal:iska_birch2_sapling -- destroys dirt block return false end if event.type == "program" or (event.type == "on" and string.lower(event.pin.name) == s) then port[b] = false port[d] = false interrupt(tb, "scan") elseif event.iid == "scan" and pin[s] then digiline_send("scan", "GET") elseif event.channel == "scan" then local node = event.msg if is_log(node) then -- chop tree port[b] = true interrupt(tc, "waitcut") elseif node == "air" then -- deploy sapling port[d] = true interrupt(1, "waitsap") else interrupt(tb, "scan") end elseif event.iid == "waitcut" then port[b] = false -- deploy sapling port[d] = true interrupt(1, "waitsap") elseif event.iid == "waitsap" then port[d] = false interrupt(tb, "scan") end