CCTransport
CCTransport's old design has been totally retired in favor of a new one. It's a bit more useful this way.GitHub - Download
There was a suggestion a while ago that CC should add the ability to serialize and deserialize items, a la Applied Energistics. The idea is generally not great in terms of balance and such, but it seems like such an obvious idea that it deserves to exist.
How to Use
It's a pretty simple to use mod. Place down the Serial Chest in the world, and attach it to your computer. The peripheral methods are as follows:
- serialChest.serialize()
Remove exactly one item from the inventory and serialize it.
Return: token, itemDetailsOrError
If the serialization fails, token will be false and itemDetailsOrError will be the error message.
If the serialization succeeds, the token is an alphanumeric, randomly generated string. itemDetailsOrError is a table with the same format as the turtle.inspect() return format. - serialChest.deserialize(token)
Deserialize a token into an item if possible.
Parameter token: The alphanumeric token representing the item to deserialize.
Return: success, errorMessage.
Deserialization fails if the item currently in the serial chest isn't the same kind of item as the item being deserialized or if there isn't enough room left. If deserialization fails, the token is not invalidated.
Deserialization succeeds if there is room for the item in the serial chest. The token is consumed and made invalid for reuse.
When a serial chest's contents are changed in any way, it emits a serial_chest_update event to all attached computers, where the event parameters are as follows:
local e, name, itemDetails = os.pullEvent("serial_chest_update")
- Parameter name: The name of the peripheral that updated.
- Parmaeter itemDetails: The details of the items in the chest.
Crafting a turtle with a serial chest makes a serial turtle, capable of using its peripheral just as an ordinary serial chest. It uses specifically the slot selected by turtle.select().
Changelog
Edited by ElvishJerricco, 08 April 2015 - 12:21 AM.