Page 2 of 2
Re: [0.10.2][kovarex] sience packs disappear
Posted: Wed Aug 20, 2014 3:04 pm
by HeilTec
To anyone familiar with javascript this 'pseudo-code' express my thoughts as best I can:
Code: Select all
function findPoweredLabsWithPacks() {
var lab, labs = findAllLabs();
var ready = [];
for (lab in labs) {
if (lab.hasPower() && lab.inventory.contains(currentResearch.packsNeeded))
ready.push(lab)
}
return ready;
}
function startNewResearch() {
var labs = findPoweredLabsWithPacks();
var needed = currentResearch.getNeededCount();
var active = 0;
for (lab in labs) {
if active < needed {
lab.startResearch()
active += 1;
}
}
}
If this makes no sense please pardon my French.
Re: [0.10.2][kovarex] sience packs disappear
Posted: Mon Aug 25, 2014 7:49 pm
by Blackence
How about this: Instead of taking the science packs from the lab's inventory when a "lab processing period" starts, why not take them at the end of the period? As soon as a lab is placed and connected to energy, the bar in the lab GUI would start to fill up and stop right at 100%. At that point, the lab needs science packs as required for the currently active research, consumes them and awards research progress and possibly the researched technology atomically (well, as atomically as it can get), resetting the lab GUI bar to 0% so it can slowly progress towards 100% again. If there's no active research (e.g. because it has been completed 0.01ms ago by some other lab), the lab just stops at 100% and waits for new research to be started, even when it's full of science packs.
Of course, this would introduce another issue with research speed, because the current research (and therefore current research speed) may change during a research period. I don't think that's a problem anyone would care about though. The research speed for the first "lab processing period" would be wrong in some cases.
I prefer BurnHard's idea because it's continuous, but this might be easier to implement.
Is it just me or is the dark text on dark grey background in this textarea a little hard to read? Hm. I should probably find that forum theme thread.
Re: [0.10.2][kovarex] sience packs disappear
Posted: Thu May 21, 2015 5:57 pm
by Lilrock
I would like to have this issue fixed. Because of this, I won't be able to automate the science packs into the labs with assurance that I'm not losing any materials.
I have a nice setup too. I was reading a Reddit post about having troubles with the speed modules in the labs, but that was a while ago and assume that it was fixed.
- Factorio_Lab_Placement.png (2.28 MiB) Viewed 3140 times
Re: [0.10.2][kovarex] sience packs disappear
Posted: Fri May 22, 2015 7:01 am
by kovarex
Actually, this is solved for 0.12.
changelog 0.12 wrote:
Lab research is now continuous. Science packs have progress bars of usage. This means that 20 labs doing research with 10 units will still be faster than 10 labs and the science packs aren't wasted.