Gas Burning Generator OpenComputers API
nolimet opened this issue ยท 13 comments
Please use the search functionality before reporting an issue. Also take a look at the closed issues!
Issue description:
The getOutput value for the openComputers API for the Gas Burning Generator is not updated once the burning rate of the generator is zero. Causing a incorrect value to be read from the machine. It displays the last value it has when it was outputting power.(setup i'm using is gas generator to universal cable to Energy Cell(thermal expansion))
edit
noticed that the generator output value in the also does not change... Also would it be posible to add a producing value to the OpenComputers API? or would that be a horrible nightmare?
Steps to reproduce:
- setup a simple OpenComputers setup with 3 generators, with a load. while reading out the output value with a computer
- remove the load and observe that output value is still the same
Version (make sure you are on the latest version before reporting):
Forge: 14.23.0.2531
Mekanism: 1.12.1-9.4.1.326
OpenComputers: 1.12.1-1.7.0.20
Other relevant version:
If a (crash)log is relevant for this issue, link it here: (It's almost always relevant)
[gist/pastebin/etc link here]
noticed that the generator output value in the also does not change
In the what? lol
As for the getOutput
function, the variable it returns is labeled in the java as
Output per tick this generator can transfer.
Meaning its output is correct, as it is not affected by whether it is currently able to do so.
You probably want to use getEnergyNeeded() > 0
to test for whether it needs to function.
Also would it be posible to add a producing value to the OpenComputers API
Probably
https://youtu.be/tXvdScpCoyI Video that show the problem...
Aa hmm what i did observe was that the generator output value does not update... When the generator is generating zero power. But yes i could add 'getEnergyNeeded() > 0 to see if it's generating anything. Also sorry for the horrible grammatical nightmare that one bit of text was... forgot to check what i wrote down
Yeah as far as I could tell the value shouldn't change unless you do something like load a different gas in it.
What would really help is if you could make a simple program that demonstrates your problem / the outputs you're monitoring in as simple a manner as possible - even if it's just a screen that shows the values and continually updates (I can do that myself, just takes time lol)
Will add a snippet of the code that monitors the values in the OC program a lil bit later. But what it shows in the vid is mostly what it does. It reads out the current output then multiplies that by 15 divided bij the maxiumum possible output for the gas burner. So it generates a redstone signal that drives a couple dials.
But i did find a work around.. when i toggle the engine off and on with redstone the values are correct again. Exept for the fact that getEnergyneeded() never reaches zero... but most of the details are in the video
Thanks, though that does not look like its simplest form. All it should be is something that prints to the screen, not something that requires an internet card and sets redstone signals(?).
Right, because you're using very small amounts always, so there's always a tiny bit drained which it rectifies almost immediately...
(its more the code I'm after)
Update the code. It should now just run after you put it on a computer. You can add 1 or more Gas Burning generators through adapters. Also remove the dependence on external scripts.
hmm before it works fine you need to install oppm and from that the power-monitor. The original script came from something of that. I used that as a base. But yes it requires a internet card and a redstone card/redstone IO
Make it only require an adapter to a single generator please. Should only print to screen.