1 posts
Posted 20 April 2015 - 10:46 AM
Hi,
I want to show some items on a monitor in my crafting room. Like top 10 items or something similar.
I have tried with OpenPheripheral, but I cant get it to work at all.
Is there a way to do what I want, or do I just give up on this?
7083 posts
Location
Tasmania (AU)
Posted 20 April 2015 - 02:59 PM
To my understanding, you either get it to work through OpenPeripheral, or it's not happening.
To see what - if any - functions
OpenPeripheral gives you access to, run its documentation script along with the name of the peripheral (as per the name you'd use to
wrap it):
openp/docs <name>
For specific info on given functions, follow that up with:
openp/docs <name> <functionname>
Note that whether or not OpenPeripheral supports your block may depend on both the version of OpenPeripheral and the version of the mod that block comes from. For older OpenPeripheral builds, you may need to install the documentation script manually (see the
OpenPeripheral thread for info on this).
For further info on wrapping and using peripherals, take a read through
this tutorial.
74 posts
Posted 20 April 2015 - 08:53 PM
Hi,
I want to show some items on a monitor in my crafting room. Like top 10 items or something similar.
I have tried with OpenPheripheral, but I cant get it to work at all.
Is there a way to do what I want, or do I just give up on this?
Looking at this for myself too. You need to use an ME interface. The interface has too many functions available to fit on the screen, so I need to make a custom viewer for the documentation to find the correct function. I will try to reply when I figure it out.
74 posts
Posted 20 April 2015 - 09:58 PM
Okay, doing that is definitely possible. I would use countOfItemType() to find out the amount of each item you wish to display, then put them in order. To see the whole list of available functions, run the following code and then run 'edit output'. Keep in mind, this is using OpenPeripherals mod and the peripheral is an ME interface connected to your system.
local p = peripheral.wrap("PeripheralName")
local f = fs.open("output")
local t = p.getAdvancedMethodsData()
f.write(textutils.serialize(t))
f.close()