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

buying from mall and pulling from store can send results to inventory, storage, or freepulls #561

Merged
merged 2 commits into from
Jan 31, 2022

Conversation

Veracity0
Copy link
Contributor

@Veracity0 Veracity0 commented Jan 30, 2022

As it turns out, both purchases via mallstore.php and pulling from your store via backoffice.php can do the following:

  • Items go to inventory (not in Hardcore or Ronin)
  • items go to storage (in Hardcore or Ronin, not a free pull)
  • items go to freepulls (in Hardcore or Ronin, is a free pull)

KoL formats the response identically (using "relstrings" and notation about sending to Hagnk's storage, as appropriate). KoLmafia uses the same primitive to parse the response.

I noticed that that method did not put Free Pulls onto freepulls. This fixes it.

I also wrote 6 tests (2 methods, 3 possible destinations) using saved responseText from testing those.

@Veracity0 Veracity0 requested a review from a team January 30, 2022 20:55
@codecov
Copy link

codecov bot commented Jan 30, 2022

Codecov Report

Merging #561 (18f1227) into main (a7c76b2) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #561      +/-   ##
============================================
+ Coverage     20.31%   20.36%   +0.04%     
- Complexity     8562     8584      +22     
============================================
  Files           998      998              
  Lines        155973   155975       +2     
  Branches      34701    34702       +1     
============================================
+ Hits          31691    31767      +76     
+ Misses       118374   118286      -88     
- Partials       5908     5922      +14     
Impacted Files Coverage Δ
.../net/sourceforge/kolmafia/objectpool/ItemPool.java 14.28% <ø> (ø)
...rceforge/kolmafia/request/MallPurchaseRequest.java 36.68% <100.00%> (+20.82%) ⬆️
src/net/sourceforge/kolmafia/KoLCharacter.java 37.14% <0.00%> (+0.12%) ⬆️
.../sourceforge/kolmafia/session/ResultProcessor.java 16.31% <0.00%> (+0.97%) ⬆️
...net/sourceforge/kolmafia/session/StoreManager.java 13.78% <0.00%> (+1.04%) ⬆️
...urceforge/kolmafia/request/ManageStoreRequest.java 40.00% <0.00%> (+2.43%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7c76b2...18f1227. Read the comment docs.

@Veracity0 Veracity0 merged commit 7916142 into main Jan 31, 2022
@Veracity0 Veracity0 deleted the take-from-store branch January 31, 2022 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants