This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Communeguy's profile picture

Controlling Minefactory Equipment via OpenPeripherals.

Started by Communeguy, 01 December 2014 - 05:11 PM
Communeguy #1
Posted 01 December 2014 - 06:11 PM
In short, can the method isActive() be used to change the activity state, or does it only return the current activity state?

I've been reading through the methods for most of the machinery, but I can't come up with any better guess for what you'd use.
Lyqyd #2
Posted 01 December 2014 - 06:27 PM
I'm not familiar with those specific peripherals, but usually a method named "isActive" would return a boolean, true for active. It would not usually accept input. If you could link to the documentation, we may be able to read through it and provide a more complete answer.
Communeguy #3
Posted 02 December 2014 - 12:43 PM
Unfortunately, OpenPeripherals rather famously doesn't have out-of-game documentation. It's supposedly possible to pull a documentation dump using /op_dump, but for whatever reason this seems not to work in my version, perhaps as a complication of the overall modpack.'
theoriginalbit #4
Posted 02 December 2014 - 02:09 PM
versions are always handy, there are so many versions we can't know exactly what its available. for example I cannot find isActive for anything MFR in the 1.7.10 OpenP, or in the 1.6.4 OpenP.

I find reading the source on GitHub is the most reliable way to read the documentation, but there is the in-game program. I've never heard of /op_dump so I have no clue what you're on about with regards to that.
Communeguy #5
Posted 02 December 2014 - 04:44 PM
Ah, yes, version numbers:

Minecraft 1.6.4
(Modpack) TechWorld2 1.1.6 (the recommended, I believe)
Computercraft: 1.58
OpenP: 0.3.1
Aaaand finally,
MFR - 2.7.5-352

"/op_dump" was a command mentioned on this forum's OpenP thread that supposedly dumps an XML file of all the available documentation. It either doesn't exist in my version (likely, since I'm apparently way behind?) or was broken by something else in TW2.
Cranium #6
Posted 02 December 2014 - 05:07 PM
If I recall, you can call peripheral.getAdvancedMethodsData() or something like that and it'll return a table of all of the methods available to that peripheral, plus any available documentation on that method. Al you'd need to do is save a serialized copy of that table to a file, and you should be able to read it.
theoriginalbit #7
Posted 03 December 2014 - 12:40 AM
idk how you've managed it, MFR integration was added into OpenP at version 0.3.2 so…