stardew-valley-data 0.23.0 → 0.24.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,6 +5,14 @@ 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.24.0] - 2026-03-22
9
+
10
+ ### Added
11
+
12
+ - `parseFishPonds()` parser added — new `fishPonds` field on `SaveData` extracting fish pond
13
+ buildings with `buildingId`, `fishType` (item ID), `currentOccupants`, and `maxOccupants`
14
+ - `SaveFishPond` interface added to save file types
15
+
8
16
  ## [0.23.0] - 2026-03-22
9
17
 
10
18
  ### Added
package/dist/index.d.mts CHANGED
@@ -2637,6 +2637,7 @@ interface SaveData {
2637
2637
  stardrops: SaveStardropEntry[];
2638
2638
  stats: SaveStats;
2639
2639
  animals: SaveAnimal[];
2640
+ fishPonds: SaveFishPond[];
2640
2641
  buildings: SaveBuilding[];
2641
2642
  cookingRecipes: SaveRecipeEntry[];
2642
2643
  craftingRecipes: SaveRecipeEntry[];
@@ -2777,6 +2778,13 @@ interface SaveAnimal {
2777
2778
  age: number;
2778
2779
  hasAnimalCracker: boolean;
2779
2780
  }
2781
+ /** A fish pond building with the fish species and population. */
2782
+ interface SaveFishPond {
2783
+ buildingId: string;
2784
+ fishType: number;
2785
+ currentOccupants: number;
2786
+ maxOccupants: number;
2787
+ }
2780
2788
  /** A farm building with its type, position, and current animal count. */
2781
2789
  interface SaveBuilding {
2782
2790
  id: string;
package/dist/index.d.ts CHANGED
@@ -2637,6 +2637,7 @@ interface SaveData {
2637
2637
  stardrops: SaveStardropEntry[];
2638
2638
  stats: SaveStats;
2639
2639
  animals: SaveAnimal[];
2640
+ fishPonds: SaveFishPond[];
2640
2641
  buildings: SaveBuilding[];
2641
2642
  cookingRecipes: SaveRecipeEntry[];
2642
2643
  craftingRecipes: SaveRecipeEntry[];
@@ -2777,6 +2778,13 @@ interface SaveAnimal {
2777
2778
  age: number;
2778
2779
  hasAnimalCracker: boolean;
2779
2780
  }
2781
+ /** A fish pond building with the fish species and population. */
2782
+ interface SaveFishPond {
2783
+ buildingId: string;
2784
+ fishType: number;
2785
+ currentOccupants: number;
2786
+ maxOccupants: number;
2787
+ }
2780
2788
  /** A farm building with its type, position, and current animal count. */
2781
2789
  interface SaveBuilding {
2782
2790
  id: string;
package/dist/index.js CHANGED
@@ -40660,6 +40660,33 @@ function parseAnimals(root) {
40660
40660
  }
40661
40661
  return result;
40662
40662
  }
40663
+ function parseFishPonds(root) {
40664
+ const result = [];
40665
+ const locations2 = ensureArray(root.locations?.GameLocation);
40666
+ for (const loc of locations2) {
40667
+ const l = loc;
40668
+ if (str(l.name) !== "Farm") continue;
40669
+ const buildings2 = ensureArray(l.buildings?.Building);
40670
+ for (const building of buildings2) {
40671
+ const b = building;
40672
+ const xsiType = str(
40673
+ b["@_xsi:type"] ?? b["@_type"]
40674
+ );
40675
+ if (xsiType !== "FishPond") continue;
40676
+ const fishTypeRaw = b.fishType;
40677
+ const fishType = num(fishTypeRaw?.int);
40678
+ if (fishType === 0) continue;
40679
+ result.push({
40680
+ buildingId: str(b.id),
40681
+ fishType,
40682
+ currentOccupants: num(b.currentOccupants),
40683
+ maxOccupants: num(b.maxOccupants)
40684
+ });
40685
+ }
40686
+ break;
40687
+ }
40688
+ return result;
40689
+ }
40663
40690
 
40664
40691
  // src/save-file/parsers/v1/buildings.ts
40665
40692
  function parseBuildings(root) {
@@ -41566,6 +41593,7 @@ var v1 = (ctx) => ({
41566
41593
  stardrops: parseStardrops(ctx.player.mailReceived),
41567
41594
  stats: parseStats(ctx.player),
41568
41595
  animals: parseAnimals(ctx.root),
41596
+ fishPonds: parseFishPonds(ctx.root),
41569
41597
  buildings: parseBuildings(ctx.root),
41570
41598
  cookingRecipes: parseCookingRecipes(ctx.player.cookingRecipes, ctx.player.recipesCooked),
41571
41599
  craftingRecipes: parseCraftingRecipes(ctx.player.craftingRecipes),