r/ComputerCraft • u/ecco7777 • 5d ago
Reminder the Inventory Functions can be called in Parallel
The inventory functions from CC:Tweaked have a 1 tick delay, when executed, so it kinda slows down every Project i wanted to do with multiple connected Inventories. But with parallel.waitForAny(), you can just call all at once.
Also i had trouble moving items from one Inventory to the other, if some were mixed connected to the computer/turtles side, but not visible to the network.
It doesn't seem to mention those things in the wiki. I tested on 1.20.1, not sure if its the case in later versions.
72
Upvotes
18
u/Insurgentbullier NIH patient 5d ago
Yeah it's neat how you can just circumvent all the yielding problems.
Personally, I've been injecting a coroutine wrapper into any yielding peripheral functions and then pretending they don't yield.
6
u/Moilli6 5d ago
Let me introduce you to the holy diagram https://ccaa.party/post/list/resource/1