stardew-valley-data 0.7.0 → 0.8.0

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/CHANGELOG.md CHANGED
@@ -5,19 +5,25 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
6
6
  adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ### [0.7.0] - 2026-03-18
8
+ ## [0.8.0] - 2026-03-18
9
+
10
+ ### Fix
11
+
12
+ - Fix Parser of Cooking Recipes to properly show cooked count
13
+
14
+ ## [0.7.0] - 2026-03-18
9
15
 
10
16
  ### Fix
11
17
 
12
18
  - Fix Collection lists using wrong Ids
13
19
 
14
- ### [0.6.0] - 2026-03-18
20
+ ## [0.6.0] - 2026-03-18
15
21
 
16
22
  ### Added
17
23
 
18
24
  - Added FishingPole Level to Parser tool
19
25
 
20
- ### [0.5.1] - 2026-03-18
26
+ ## [0.5.1] - 2026-03-18
21
27
 
22
28
  ### Fix
23
29
 
package/dist/index.js CHANGED
@@ -34252,8 +34252,33 @@ function parseRecipes(data) {
34252
34252
  }
34253
34253
  return result;
34254
34254
  }
34255
- function parseCookingRecipes(data) {
34256
- return parseRecipes(data);
34255
+ var cookingIdToName = new Map(
34256
+ cooking_default.map((r) => [r.id, r.name])
34257
+ );
34258
+ function parseCookingRecipes(knownData, cookedData) {
34259
+ const cookedCounts = /* @__PURE__ */ new Map();
34260
+ for (const item of extractDictItems(cookedData)) {
34261
+ const key = item.key;
34262
+ const val = item.value;
34263
+ const id = str(key?.string);
34264
+ if (id) cookedCounts.set(id, num(val?.int));
34265
+ }
34266
+ const cookedByName = /* @__PURE__ */ new Map();
34267
+ for (const [id, count] of cookedCounts) {
34268
+ const name = cookingIdToName.get(id);
34269
+ if (name) cookedByName.set(name, count);
34270
+ }
34271
+ const result = [];
34272
+ for (const item of extractDictItems(knownData)) {
34273
+ const key = item.key;
34274
+ const name = str(key?.string);
34275
+ if (!name) continue;
34276
+ result.push({
34277
+ name,
34278
+ timesMade: cookedByName.get(name) ?? 0
34279
+ });
34280
+ }
34281
+ return result;
34257
34282
  }
34258
34283
  function parseCraftingRecipes(data) {
34259
34284
  return parseRecipes(data);
@@ -34351,7 +34376,7 @@ var v1 = (ctx) => ({
34351
34376
  stats: parseStats(ctx.player),
34352
34377
  animals: parseAnimals(ctx.root),
34353
34378
  buildings: parseBuildings(ctx.root),
34354
- cookingRecipes: parseCookingRecipes(ctx.player.cookingRecipes),
34379
+ cookingRecipes: parseCookingRecipes(ctx.player.cookingRecipes, ctx.player.recipesCooked),
34355
34380
  craftingRecipes: parseCraftingRecipes(ctx.player.craftingRecipes),
34356
34381
  bundles: parseBundles(ctx.root, ctx.mailSet),
34357
34382
  monstersKilled: parseMonstersKilled(ctx.player),