@jeremyckahn/farmhand 1.19.25 → 1.19.27

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/README.md CHANGED
@@ -59,6 +59,17 @@ Farmhand uses a [SemVer](https://semver.org/)-like versioning system. It differs
59
59
  - This project uses [Vite](https://vitejs.dev/), so please refer to the documentation of that project to learn about the development toolchain.
60
60
  - Farmhand uses [Piskel](https://www.piskelapp.com/) for the art assets.
61
61
 
62
+ ## Debugging
63
+
64
+ Farmhand exposes its live game state on `window.farmhand` in the browser console, for ad hoc inspection and manipulation during development. This mirrors the game's internal state-management API:
65
+
66
+ ```js
67
+ window.farmhand.state // read the current game state
68
+ window.farmhand.setState({ money: 999999 }) // merge a partial update into state
69
+ ```
70
+
71
+ Prefer this over editing `useState` values directly in the React DevTools components panel — DevTools' hook editor overwrites the rendered value without updating the hook's underlying update queue, so the edit gets silently discarded the next time any real `setState` call fires (which happens frequently, e.g. via the heartbeat timer or day-advancement effects). `window.farmhand.setState()` goes through the real state dispatch, so it persists.
72
+
62
73
  ## Running locally
63
74
 
64
75
  Requires: