Posted 05 December 2012 - 09:58 AM
This was my first lua program. I hope I could get some suggestions and maybe edits to make it better.
(This is many hours of work so only constructive criticism if you find a problem please.)
The idea is there are two computers, one that makes orders and one that pulls items. The order chest would be put next to the input chest, which uses a normal sorting system to put all the items in the correct chests where the pull computer will keep track of the items in the chest and send them back to the input chest if asked.
Block Layout (From birds eye view):
|H|X|P|X|H|
|T|C|D|C|T|
H = chest
X = transposer
P = pipe
T = item detector
C = computer
D = disk reader
This setup allows for the maximum space conservation. You would stack 8 of these layers (8 layers for 2 sorting machines) with a block in between each layer except on the computers where the wireless modems will sit on top of the computers. There needs to be a disk in the disk readers or no disk reader at all otherwise items will go into it when getting pulled. Also, the pull code needs to be edited for the correct side to receive a pulse from the detector. Each computer also needs to be labeled with the correct lower case item name for the items in the chest.
When an item gets sorted the item detector pulses increasing the inventory variable. When the order is made, the computer pulses the transposer and pulls the item out of the chest and sends it along the line.
Some problems I have encountered are simultaneous events (when items are getting counted and a message comes through), Chest overflow (I plan to update it so that it knows when a chest is full and sends a message), and distance between the order computer and the pull computers.
If you want to use this system please leave credit where it is due.
Let me know what you think. I will respond to questions and comments.
Pictures:
(This is many hours of work so only constructive criticism if you find a problem please.)
The idea is there are two computers, one that makes orders and one that pulls items. The order chest would be put next to the input chest, which uses a normal sorting system to put all the items in the correct chests where the pull computer will keep track of the items in the chest and send them back to the input chest if asked.
Block Layout (From birds eye view):
|H|X|P|X|H|
|T|C|D|C|T|
H = chest
X = transposer
P = pipe
T = item detector
C = computer
D = disk reader
This setup allows for the maximum space conservation. You would stack 8 of these layers (8 layers for 2 sorting machines) with a block in between each layer except on the computers where the wireless modems will sit on top of the computers. There needs to be a disk in the disk readers or no disk reader at all otherwise items will go into it when getting pulled. Also, the pull code needs to be edited for the correct side to receive a pulse from the detector. Each computer also needs to be labeled with the correct lower case item name for the items in the chest.
When an item gets sorted the item detector pulses increasing the inventory variable. When the order is made, the computer pulses the transposer and pulls the item out of the chest and sends it along the line.
Some problems I have encountered are simultaneous events (when items are getting counted and a message comes through), Chest overflow (I plan to update it so that it knows when a chest is full and sends a message), and distance between the order computer and the pull computers.
If you want to use this system please leave credit where it is due.
Let me know what you think. I will respond to questions and comments.
Pictures: