Skip to content

Commit

Permalink
fix still selling keys when both keys and ref>=max
Browse files Browse the repository at this point in the history
  • Loading branch information
idinium96 committed Jul 15, 2020
1 parent 19f05e8 commit 24af4cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/classes/MyHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1394,15 +1394,15 @@ export = class MyHandler extends Handler {
* (currKeys ≤ minKeys OR minKeys ≤ currKeys ≤ maxKeys OR currKeys ≥ maxKeys)
*/
const isRemoveAutoKeys =
(currReftoScrap >= userMinReftoScrap &&
currReftoScrap <= userMaxReftoScrap &&
(((currReftoScrap >= userMinReftoScrap && currReftoScrap <= userMaxReftoScrap) ||
currReftoScrap >= userMaxReftoScrap) &&
(currKeys <= userMinKeys ||
(currKeys >= userMinKeys && currKeys <= userMaxKeys) ||
currKeys >= userMaxKeys)) !== false;
/*
// <·····●····························●·····> (OR) \
// <·····●····························●·····> \
// Keys --------|----------------------------|----------> ⟩ AND
// ●————————————————————————————● (AND) /
// ●————————————————————————————●·····> /
// Refs --------|----------------------------|---------->
// min max
*/
Expand Down

0 comments on commit 24af4cb

Please sign in to comment.