[Question] ComputerCraft integration?
dmarcuse opened this issue Β· 18 comments
In the source code, I see commented out partial integration for ComputerCraft and OpenComputers. Is this still a WIP, or something that was disabled? It would be really convenient to be able to access reactor stats and respond accordingly.
I may do that, but OC is the priority as it is a little more popular - CC hasn't been updated in nearly a year and is still in Alpha, too.
There's a few different forks of CC which are being actively maintained and are compatible with the same API - notably CC: Tweaked. I'd also be happy to give it a shot myself and PR it if you prefer.
It's been commented out as it didn't work :P
I certainly will attempt OC support again though :)
I actually checked in on the issues to make this same suggestions for OC after deciding to study into the mod and came across a comment saying "Nuclearcraft needs a simulator like big reactors had.ο»Ώ" which made me think that you may be able to make at least some sort of calculator in OC and depending on it's implementation it may be feasible for OC to analyze a reactors build and efficiency... Not a real valuable comment but show of support for the feature...
The OC integration will defo be able to read those sorts of stats - really that's all it needs to do other than be able to turn off the reactor and things like that. I do think I now understand how the API works, so hopefully I can begin making progress with this :)
Turns out the OC API is awesome and itβs quite easy to add computer functions for a machine - expect to see OC support for the Fission and Fusion Reactors in the next update ;)
Oh yeh, good point - I'll re-open. If you'd like to put in a PR that would be awesome, but I will also get round to it at some point otherwise :)
Nice one :) Can you integrate the method to get a response which fuel is inside ? Would be great :)
Can you not just do something like that with the name of the fuel, i.e. read the fuel name and wait for there to be No Fuel
?
Well it's possible to read out an inventory (like a chest) with the fuel and sort it out but i stuck currently on the point if more than one slot contain the same fuel (example: Slot 1 has 64x LEU-233, Slot 2 has 14x Thorium, Slot 3 has 15x LEU-233 and so on). i should think about it again 'cause i think its just a logical think blockade ;)
After checking all of the methods from the fission controller i suggest something:
activate & deactivate should response with a boolean (true or false) if the reactor is running while a redstone signal is on the controller. Or better would be a method called "isRunning" that response with: true or false
Then getReactorProcessTime should response with the time which being used currently (also count down). For Example: LEU235 by 8 cells takes 9000 Ticks? (don't know what ReactorProcessTime response but i think it's ticks). When the Process is half down it should display 4500 Ticks and so on?
Or did you mean that ReactorProcessTime only should response with the time which the fuel needs to consume the fuel?
If no Fuel is present then it response with 0.125? Shouldn't it be 0?
getProblem response everytime with "Casing Incomplete". Don't understand the sense behind this method ^_^
getMaxHeat would be very nice to get the maximum heat capacity of the reactor.
do you have any information about the temperature level when the reactor have a melt down ? ;)
Next one: Can you include a method to display the current output?
Case: It the Reactor produce f. e. 3300 RF/t and 300 RF/t is output from the reactor to a machine i have no idea to calculate it right. The only way to calculate it is to make a variable with the old energylevel and compare it with the new energylevel so that the difference is the output from the reactor to the machine. Mekanism induction matrix has the methods getInput and getOutput - should also be possible at some way and easier for the enduser :)
oh and a table which fuel is allowed. For example:
{ "LEU-235" = "enabled", "LEU-233" = "disabled", ... }
So that the controller don't accept LEU-233 until it's reactivated
:) sorry but my ideas are bubbleing :D
Or better would be a method called "isRunning" that response with: true or false
Done!
Then getReactorProcessTime should response with the time which being used currently
Added a method called 'getCurrentProcessTime'.
If no Fuel is present then it response with 0.125? Shouldn't it be 0?
Fixed!
getProblem response everytime with "Casing Incomplete". Don't understand the sense behind this method
Fixed!
getMaxHeat would be very nice to get the maximum heat capacity of the reactor.
Added!
Can you include a method to display the current output?
Added a method called 'getEnergyChange' :)