Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #7

Merged
merged 2 commits into from
Jul 31, 2014
Merged

Development #7

merged 2 commits into from
Jul 31, 2014

Conversation

jakkarth
Copy link

OK. Working Visual Studio means I could actually compile and test this before sending the pull request. You do not want to know what I had to do to get that build environment set up.

When mining using ORS, if there's insufficient storage for the output product, I refund the fraction of the power that wasn't used. I also made the power usage gui element smooth out a bit for situations where the miner is racing the refinery.

When refining using the ISRU, if no output material was able to be stored, I refund all of the source materials and megajoules. Gui elements in the context menu properly display power usage and conversion rates.

When both ORS mining AND ISRU refining are active and competing for insufficient power, mining seems to get priority until the resource is full, at which point it'll start refunding power. The ISRU then has some power left when its turn comes around, and removes some of the base resource to produce whatever. On the next tick, mining isn't full anymore, so it'll use a fraction of a tick of power to top off, leaving the ISRU with a fraction of the power for the tick to do a small amount of conversion. At this point it's steady state until the ISRU's output products are full, at which point they'll both stop using power with their tanks completely full, and megajoules will begin to accumulate again.

Thus, a ship with an ISRU and an aluminum hybrid rocket on mun, with an un-upgraded 6.25m fission reactor and generator, can now (eventually) refuel by leaving the mining and electrolysis options turned on at the same time.

confusingbits pushed a commit that referenced this pull request Jul 31, 2014
More mining/refining work.
@confusingbits confusingbits merged commit 6f66e86 into confusingbits:development Jul 31, 2014
@confusingbits
Copy link
Owner

I'm wary about messing with ORS since other addons use it, but it can be useful as a starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants