Sorcelator, on 25 September 2013 - 10:49 AM, said:
Ok so I figured out what the issue was and here is how I fixed it.
-snip-
About Cinnabar Ore, replace
if string.find(tableInfo.name, "Ore") then -- Find Ore
with
if string.find(tableInfo.name, "Ore") and not string.find(tableInfo.name, "Cinnabar") then -- Find Ore
Just some notes on things you can improve (good practice, not actual problems):
if i == 27 then
i = 1
end
should be
if i >= slotnum then
i = 1
end
The >= is in case i somehow gets a higher value - this shouldn't happen but it's still good practice. Use slotnum instead of 27 in case you decide to move to a bigger chest, so you don't have to fix your code.
"shell.run("clear")" can be replaced with "term.setCursorPos(1,1) term.clear()". You can put these two commands in a function if you want. This is more efficient than running a program just to clear the screen.
"if tableInfo ~= nil then ... end" can be "if tableInfo then ... end" as long as tableInfo isn't false (which it won't be unless you screw up OpenP)
I've been trying to figure out for a while how to organize my machines best to facilitate complete automation in as small a space as possible. You just gave me an great idea - cram all of them next to each other in some way that makes sense, connect them all to peripheral cables, and machine.push() and .pull() items around through chests! Much less confusing than a sensor turtle that has to man all of the machines! I never would have thought of that, as simple as it sounds. Thanks!
stacked layers of:
+AM
MBsM
+CM
where ABC are various machines, s is a chest (s for storage), M's are wired modems connected to the network, and +'s are power cables. There's no machine D so you can stick modems (probably with peripheral proxies) on the chests. Multiple layers would be stacked, allowing the chests to exchange things vertically. This could be optimized by vertically stacking machines commonly used together, like macerators and furnaces, directly above each other, so you don't have to move items through the chest to smelt your macerated metal dusts.