libram 0.8.10 → 0.8.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/diet/index.js +5 -2
- package/package.json +2 -4
package/dist/diet/index.js
CHANGED
|
@@ -349,9 +349,12 @@ class DietPlanner {
|
|
|
349
349
|
const organCapacitiesWithMap = new Map(organCapacities);
|
|
350
350
|
for (const [organ, size] of organSizes) {
|
|
351
351
|
const current = organCapacitiesWithMap.get(organ);
|
|
352
|
-
if (current
|
|
353
|
-
|
|
352
|
+
if (current === undefined) {
|
|
353
|
+
// Organs with no capacity are excluded from the organCapacities map, so this item excluded from the trial.
|
|
354
|
+
// Solves the problem with the diet offering to eat toasted brie after exiting Shrunken Adventurer with 20/15 fullness.
|
|
355
|
+
return this.planOrgansWithTrials(organCapacities, trialItems.slice(1), overrideModifiers);
|
|
354
356
|
}
|
|
357
|
+
organCapacitiesWithMap.set(organ, current - size);
|
|
355
358
|
}
|
|
356
359
|
const organCapacitiesWith = [...organCapacitiesWithMap];
|
|
357
360
|
const isRefinedPalate = (trialItem.item === $item `pocket wish` &&
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "libram",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.12",
|
|
4
4
|
"description": "JavaScript helper library for KoLmafia",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -25,8 +25,7 @@
|
|
|
25
25
|
"dist/**/*.d.ts"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"html-entities": "^2.4.0"
|
|
29
|
-
"mersenne-twister": "^1.1.0"
|
|
28
|
+
"html-entities": "^2.4.0"
|
|
30
29
|
},
|
|
31
30
|
"devDependencies": {
|
|
32
31
|
"@babel/compat-data": "^7.17.0",
|
|
@@ -38,7 +37,6 @@
|
|
|
38
37
|
"@tsconfig/node16": "^1.0.2",
|
|
39
38
|
"@types/jest": "^27.0.1",
|
|
40
39
|
"@types/lodash-es": "^4.17.4",
|
|
41
|
-
"@types/mersenne-twister": "^1.1.3",
|
|
42
40
|
"@types/node": "^16.11.11",
|
|
43
41
|
"@types/node-fetch": "^2.5.7",
|
|
44
42
|
"@typescript-eslint/eslint-plugin": "^5.5.0",
|