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

If machine has work

Started by makeme, 23 January 2015 - 06:12 PM
makeme #1
Posted 23 January 2015 - 07:12 PM
I want lights to turn on above my machines when they have work, how would I do this is there a function to show this for all / most machines?
Edited on 23 January 2015 - 06:13 PM
Doyle3694 #2
Posted 23 January 2015 - 09:31 PM
What machines are this? For example pneumaticcraft's machines have functions associated with them. OpenPeripherals also allows functions for some tile entities like the vanilla chest.
Edited on 23 January 2015 - 10:11 PM
HPWebcamAble #3
Posted 24 January 2015 - 12:06 AM
is there a function to show this for all / most machines?

Yes there is, in the peripheral API


peripheral.getMethods(name)

It returns the methods of 'name' in a table

If you are having trouble, here's a program that does it for you:
http://pastebin.com/sKLqTGrM
Bomb Bloke #4
Posted 24 January 2015 - 12:50 AM
Just throwing it out there, but you can do this with Buildcraft gates. Heck, wouldn't surprise me if Thermal Expansion's servos can do it by now.