Add api for bundled/colored redstone conduits
payonel opened this issue ยท 9 comments
Issue Description:
In short, this is a request for an interface/api to utilize EnderIO redstone conduit color-based channels
We look forward to improving OpenComputers integration with EnderIO, specifically with EnderIO's redstone channels. Currently in 1.12 we support getting and setting redstone signal strength on the redstone conduit, treating it as a vanilla redstone resource. I believe that currently there is not way for us to add this integration.
Affected Versions
EnderIO-1.12.2-5.0.44.jar
So currently we have the following code (commented out since cc integration was remove a while ago), but if I understand correctly it should provide the sort of information you need?
If so, I can look into externalising an api like this.
that looks like part of it - specifically the getter Map<DyeColor, Signal>
. Also, I'm happy to implement and interface, and/or a capability; I am happy to put most of the integration (i.e. cross mod code) on the OC side (yep, enderio gets special treatment ๐ )
I suspect there will be 16 dye/color redstone values? I'll refer to these as the bundled redstone power levels
Here are some example concepts I want to implement
- redstone conduits should know that some OC blocks can receive/read bundled redstone levels.
- some OC blocks should be able to set (emit) the bundled set of redstone values to redstone conduits
I'll have a look to put parts of the old code back in place so any API adapter code can hook into the conduits. It won't be a full fledged API (or API usage), but just enough for an API adapter!
This would be awesome. The last time I wanted to use bundled redstone, I had to use OC to talk to TIS3D to talk to charset bundled wires because all of the other OC compat I wanted to use was disabled or not yet reimplemented.
I had a quick look at the 1.7.10 code to see what we did in the past. I found a more generic way to read other block's bundled signals, but I didn't find how other blocks could read the conduits' bundled signals. I'm probably blind---anyone here with at least one eye? ;)
but I didn't find how other blocks could read the conduits' bundled signals
wasn't there an API provided by either computercraft or project red!? Those are at least the most known mod to me that brought in colorchannels that were interacting properly
Instead of trying to overhaul conduits entirely to re-implement this, would it be reasonable to add a new filter for "bundled redstone" that can be used on the input or output of a given redstone connector to remove the color selection, remove strong/weak option, and just provide the bundled signal in/out?
well.. 8eb67c6 says it "cleans up" redstone conduits but it makes the ISignalProvider
API entirely unused despite still being defined. ISignalProvider
definitely seems like the wrong shape because it doesn't use/understand BundledSignal
. how much could the above commit be just straight up reverted to restore this behavior?