Posted 17 May 2014 - 03:51 AM
So, I've been working the past few days on coming up with a new sorting room for all my items to come into when running quarries or just out and about sending items back. I set up a nice room with all the basic crafting machines I need for such purposes and thought to myself, I should be able to handle this with a ComputerCraft program instead of a bunch of BC pipes intermingled with TE pipes and some ME interfaces like my old sorting room.
However I've ran into a problem…
FIrst off a little explanation on how I do my current BC / TE sorting system. Lets take Ores for example. I like to keep some pulverized ores around for blending into other metals, like Invar. So my sorting system is currently set up in a way that it auto pulverizes all ores, and then auto smelts 2/3rds of each specific kind of ore that comes in. I'd like to be able to maintain this type of setup.
Now the approach I was taking, I figured I could write a program that would let me input values of what item I wanted to craft based on how many of something was in the system. Storing the items I want to craft based on what items and such is easy enough to do. The problem comes in when I went to start writing the routine that would actually request the crafting be done from the ME system (in this case the "crafting" is turning pulverized ore into ingots, which I have a interface set up to send those into a chest that is piped to a line of smelters). I cannot figure out anyway to reliably tell when the crafting job has been completed. So I have know way to know, when it's ok to send off a crafting request for the same item again.
Imagine a situation with a quarry, lets say it hits a good Iron Ore vein and I have 20 iron ore come in back to back. If I tried to tell the program to request crafting pulverized iron ore when there is more than 0 iron ore, it's going to attempt that request everytime it goes through the loop and see iron ore in the ME network. I was thinking, well maybe I could watch the count of the resulting item and know when it's done with the last request based on that. Well that would work, as long as the resulting item isn't being used for anything else. If I had say a 2nd request to autocraft iron ingots anytime there was more than 500 pulverized iron ore, then the count would be inaccurate as it would pull pulverized out for crafting into iron ingots as soon as they are crafted.
I know I could set up a ridiculous number of level emitters and export buses to accomplish this, but I'm trying to avoid that. Even if I used computers in place of the level emitters, I'd still need 1 export bus for every item I wanted to do something with like this.
So, I'm at a sticking point and looking to see if anyone else has any other ideas / alternatives to what I'm attempting to do.
EDIT: Oh, yeah guess I should mention I'm using ComputerCraft 1.58 and the currently available OpenPeripherals for it. Using a pack called The Crack Pack through ATLauncher.com, and that is what it has in it. I tried upgrading to CC 1.63 with this pack, but couldn't get any of the Open* stuff to work with it, so having to wait until the release official support for CC 1.6 and the pack updates.
However I've ran into a problem…
FIrst off a little explanation on how I do my current BC / TE sorting system. Lets take Ores for example. I like to keep some pulverized ores around for blending into other metals, like Invar. So my sorting system is currently set up in a way that it auto pulverizes all ores, and then auto smelts 2/3rds of each specific kind of ore that comes in. I'd like to be able to maintain this type of setup.
Now the approach I was taking, I figured I could write a program that would let me input values of what item I wanted to craft based on how many of something was in the system. Storing the items I want to craft based on what items and such is easy enough to do. The problem comes in when I went to start writing the routine that would actually request the crafting be done from the ME system (in this case the "crafting" is turning pulverized ore into ingots, which I have a interface set up to send those into a chest that is piped to a line of smelters). I cannot figure out anyway to reliably tell when the crafting job has been completed. So I have know way to know, when it's ok to send off a crafting request for the same item again.
Imagine a situation with a quarry, lets say it hits a good Iron Ore vein and I have 20 iron ore come in back to back. If I tried to tell the program to request crafting pulverized iron ore when there is more than 0 iron ore, it's going to attempt that request everytime it goes through the loop and see iron ore in the ME network. I was thinking, well maybe I could watch the count of the resulting item and know when it's done with the last request based on that. Well that would work, as long as the resulting item isn't being used for anything else. If I had say a 2nd request to autocraft iron ingots anytime there was more than 500 pulverized iron ore, then the count would be inaccurate as it would pull pulverized out for crafting into iron ingots as soon as they are crafted.
I know I could set up a ridiculous number of level emitters and export buses to accomplish this, but I'm trying to avoid that. Even if I used computers in place of the level emitters, I'd still need 1 export bus for every item I wanted to do something with like this.
So, I'm at a sticking point and looking to see if anyone else has any other ideas / alternatives to what I'm attempting to do.
EDIT: Oh, yeah guess I should mention I'm using ComputerCraft 1.58 and the currently available OpenPeripherals for it. Using a pack called The Crack Pack through ATLauncher.com, and that is what it has in it. I tried upgrading to CC 1.63 with this pack, but couldn't get any of the Open* stuff to work with it, so having to wait until the release official support for CC 1.6 and the pack updates.
Edited on 17 May 2014 - 02:05 AM