@jeremyckahn/farmhand 1.20.2 → 1.20.4

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.
@@ -28,6 +28,10 @@ import {
28
28
  // Field items
29
29
  scarecrow,
30
30
  sprinkler,
31
+
32
+ // Cow items
33
+ cowFeed,
34
+ huggingMachine,
31
35
  } from './items.js'
32
36
 
33
37
  import { fertilizer, mulch } from './recipes.js'
@@ -66,6 +70,10 @@ const inventory: farmhand.item[] = [
66
70
  fertilizer,
67
71
  scarecrow,
68
72
  sprinkler,
73
+
74
+ // Cow items
75
+ cowFeed,
76
+ huggingMachine,
69
77
  ]
70
78
 
71
79
  export default inventory
package/src/farmhand.d.ts CHANGED
@@ -281,6 +281,12 @@ declare namespace farmhand {
281
281
 
282
282
  type achievementCondition = (state: state, prevState?: state) => boolean
283
283
  type achievementReward = (state: state) => state
284
+ type achievementProgress = (
285
+ state: state
286
+ ) => {
287
+ currentValue: number
288
+ goal: number
289
+ }
284
290
 
285
291
  interface achievement {
286
292
  id: string
@@ -289,6 +295,7 @@ declare namespace farmhand {
289
295
  rewardDescription: string
290
296
  condition: achievementCondition
291
297
  reward: achievementReward
298
+ getProgress?: achievementProgress
292
299
  }
293
300
 
294
301
  interface level {
@@ -1,4 +1,4 @@
1
- import { scarecrow } from '../data/items.js'
1
+ import { cowFeed, huggingMachine, scarecrow } from '../data/items.js'
2
2
 
3
3
  import { getAvailableShopInventory } from './getAvailableShopInventory.js'
4
4
 
@@ -11,6 +11,6 @@ describe('getAvailableShopInventory', () => {
11
11
  tools: {},
12
12
  stageFocusType: {},
13
13
  } as any)
14
- ).toEqual([scarecrow])
14
+ ).toEqual([scarecrow, cowFeed, huggingMachine])
15
15
  })
16
16
  })