cc-tweaked / CC-Tweaked

Just another ComputerCraft fork
https://tweaked.cc
915 stars 209 forks source link

Inventory methods for remote Turtle in wired network #1392

Open Ale32bit opened 1 year ago

Ale32bit commented 1 year ago

Wrapping a turtle in the network (attached to wired modem block) exposes the exact same methods as the computer peripheral, which does not have an inventory.

Implementing the inventory methods to the turtle peripheral would allow to manipulate its inventory, like it did in Plethora.

SquidDev commented 1 year ago

See also #633. I'm still not sure about it - I understand why it's useful, it just also feels a little weird.

Lupus590 commented 1 year ago

It's not too difficult to write something that simulates the desired behaviour.

https://github.com/Lupus590-CC/CC-Random-Code/blob/master/src/turtleGenericInventoryProxy.lua

SquidDev commented 1 year ago

@Lupus590 I believe Ale is referring to reading the turtle's inventory from another computer, not from the current turtle.

Lupus590 commented 1 year ago

You probably could still make a proxy by using the turtle's internal stuff and rednet. But that is a bunch of extra overhead.