Skip to content

fill only up to the amount we need - #926

Merged
spaghetti-squash merged 2 commits into
mainfrom
fill-to-should-fill-to
Oct 4, 2026
Merged

spaghetti-squash merged 2 commits into
mainfrom
fill-to-should-fill-to

Conversation

@spaghetti-squash

@spaghetti-squash spaghetti-squash commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

This does two things, broadly:

  1. Previously, while we checked getFuel() < targetUnits (as one would expect for a function called fillTo rather than fillBy), we were ultimately filling by targetUnits in the amount of fuel we tried to obtain.
  2. this refactors the item acquisition process a little bit to avoid overshooting our fuel target, by basing the amount of fuel we obtain on the highroll. This requires more retrieve calls, but should save meat.

If we decide that the addition mall hits caused by 2 are undesirable (I would expect it to take ~3 buy-cycles for most fuels, which isn't really that much), we should close this out but still fix 1 however we see fit.

@spaghetti-squash
spaghetti-squash merged commit 64ff807 into main Oct 4, 2026
3 checks passed
@spaghetti-squash
spaghetti-squash deleted the fill-to-should-fill-to branch October 4, 2026 17:17
github-actions Bot pushed a commit that referenced this pull request Oct 4, 2026
…-fill-to

fill only up to the amount we need
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