GregTechCEu / GregTech-Modern

GregTech CE Unofficial for modern versions
GNU Lesser General Public License v3.0
232 stars 127 forks source link

Controlling machines with ComputerCraft #806

Open Burkino opened 5 months ago

Burkino commented 5 months ago

Cross-mod Integration

CC: Tweaked

Feature Description

I would like for there to be a way to control Greg machines through ComputerCraft. Specifically, I want to control the programmed circuit; however more control (working, overclock, etc) would be nice. Being able to read the same data as an advanced activity detector cover and energy detector cover would make for some cool monitor displays.

getProgrammedCircuit() -> nil|0-32 setProgrammedCircuit(nil|0-32) getWorking() -> true|false setWorking(true|false)

richie3366 commented 1 month ago

While waiting for an official integration, you can use the KubeJS + CC: Tweaked mod that just got released (full disclosure: I contributed to porting it into 1.20.1).

There are GTCEu script examples in the main README. The methods you asked for are among them (except they will return -1 instead of nil when there is no circuit).

I'd be happy to read your feedback if you happen to use it! Even better if you develop some others of your own. (CC: @kryj)