21 lines
606 B
Lua
21 lines
606 B
Lua
if event.type == "program" then
|
|
mem.events = {}
|
|
end
|
|
|
|
if event.type == "item" then
|
|
local name = event.item.name
|
|
if name:find("sapling", 1, true) ~= nil then
|
|
if event.side == "white" then
|
|
digiline_send("treesort",{name="sapling", count=-event.item.count})
|
|
return "green"
|
|
else
|
|
digiline_send("treesort",{name="sapling", count=event.item.count})
|
|
return "white"
|
|
end
|
|
end
|
|
if name:find("fertiliser", 1, true) ~= nil then
|
|
digiline_send("treesort",{name="fertiliser", count=event.item.count})
|
|
return "black"
|
|
end
|
|
return "green"
|
|
end |