Closed henrybauer closed 9 years ago
Still needs some work - need to only create one KAC alarm per build if we have multiple resources (although I'm not sure how I'd test multiple resources), and KerbalStats makes it overestimate.
Oh and there's some cruft in there to get it to compile with 0.90. Will need to rebase against the proper 0.90 release.
This patch is basically ready, except it still overestimates when KerbalStats is installed.
I've been avoiding looking at the math for KerbalStats, and finally did so.. I can't use the current delta method to compute that, since the increase in productivity changes every step (the delta of the delta changes). So, being accurate for KerbalStats would require a whole different method. I can think of two ways to do it:
Since I don't know how to do the second one, I've been thinking about the first.
Both methods would mean calculating the ETA once at the start of the build instead of every FixedUpdate because it's not exactly lightweight calculations. We would also have to recalculate whenever the ship changes (just like onCrewTransferred calls DetermineProductivity() already). That's probably better overall for performance anyways.
It would also mean trying to figure out how much productivity we need - which right now seems to be kerbalHours needed = (number of resource needed * density * 5), or RocketParts * 0.0025 * 5. So 1000 RocketParts would be... 25 kerbalHours? Actually that seems fairly straightforward.
I started writing up this comment as to why the current version should be merged now and the KerbalStats version should be merged at some future date.. but now it doesn't seem like it will be so terrible to do, so I might as well do that first. :)
After a rather desperate race to get a workshop up to my station to get a ship built in time for a Jool window, I see the value of even an inaccurate ETA. Please update this so I can merge it.
Note: keep in mind that I plan on adding recipes so not only will RocketParts not be the only required resource, but the Kh/t for each resource may vary (for now, don't worry too much about the latter).
Merged up to date with master, no real changes. Tested again and it still works :)
Includes the Settings window change
For issue #78, just adds a simple hh:mm:ss display to the progress bar