[v8] Speed upgrades no longer (consistently) improves gas-efficiency of Injectors, Purifiers
codewarrior0 opened this issue ยท 17 comments
Even if the change is intentional, there is likely a bug here.
With no speed upgrades, gas-efficiency is low, the factory barely able to process one stack, consuming all available HCl as it goes. With exactly one speed upgrade, gas-efficiency is very high - supplied by an 18-high x0.8 evaporation plant with no other bottlenecks, an Advanced factory processes all five stacks while building up HCl in its reservoir. With two or more speed upgrades, gas-efficiency is back down to what it is with no upgrades.
I have probably done something wrong in the name of efficiency. Give me a while to find it and fix it.
Yeah, I found out what's wrong. You can't cache the result of getSecondaryEnergyPerTick because it returns either 0 or 1 each time. It should probably be computed once per tick instead of stored in an instance variable.
Yeah, that's it. I'm not at my computer right now, but I'll fix it when next I am.
I've got 8 of both kinds of upgrades in my purification chamber and its running like crap XD
Okay, now THIS is weird. Starting from zero upgrades, adding one upgrade does not improve gas efficiency. However, starting from two upgrades, removing one upgrade does improve gas efficiency dramatically.
Actually, this isn't so weird when you know that the upgraded gas usage is calculated using a random number... but that itself is kind of weird.
having a gas efficiency specific upgrade isn't a bad idea, one for power storage and power efficiency another one for gas?
@unpairedbracket, push your changes to the development branch - once you're finished I'll go ahead and finalize the 8.0.1 release.
I'm working on this now. Would you prefer that, for machines like the Injection and Purification Chambers, gas usage is like energy usage (speed upgrades increase usage per item, energy upgrades decrease it, equal numbers of each have same usage per item) or something different (eg. usage per item unchanged by speed increases, energy upgrades decrease usage, same number of each means same rate of gas usage)?
I was also considering a separate secondary energy upgrade, and have those make gas usage more efficient instead of energy upgrades. What do you think of that as an idea?
Just finishing up the new upgrade and checking that it works, I'll push in a few minutes.
There, I've pushed my changes. Gas upgrades should improve usage for machines where it makes sense.
@unpairedbracket, injecting & purifying factories are no longer using gas.