You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: implement Save/Load API for persistent game data storage
Add comprehensive Save/Load API (24/25 Rust scripting APIs now complete):
- Persistent key-value storage supporting integers, floats, strings, and JSON objects
- File-based persistence with auto-save to ./saves/savegame.json
- Thread-safe implementation using Arc<Mutex<>> for concurrent access
- Full API: setInt/getInt, setFloat/getFloat, setString/getString, setObject/getObject
- Data management: deleteKey, clear, hasKey
- Manual save/load methods with error handling
- Comprehensive test suite with 13 tests in save_load_test.lua
Implementation:
- Created save_api.rs (800+ lines) with FileSaveManager and SaveManagerProvider trait
- Integrated into script_system.rs for automatic registration per entity
- Added test coverage for all operations including persistence and nested objects
- Fixed missing 'prefabs' field in Scene struct across test files
Updated ROADMAP.md to reflect completion (96% of Rust scripting APIs done).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: ROADMAP.md
+42-23Lines changed: 42 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -448,7 +448,7 @@
448
448
449
449
**TypeScript APIs Missing (7/24):** 15. ❌ Camera API 16. ❌ Material API 17. ❌ Mesh API 18. ❌ Light API 19. ❌ Collision API 20. ❌ UI API 21. ✅ Scene API 22. ❌ Save/Load API 23. ❌ Particle API (blocked by Particle System) 24. ❌ Animation API (blocked by Animation System)
0 commit comments