Add storage-backed story history

This commit is contained in:
2026-05-15 21:58:30 +02:00
parent f2e786d5bc
commit 42582352d6
16 changed files with 1048 additions and 113 deletions
+3 -3
View File
@@ -131,7 +131,7 @@ class SocketClientModule extends BaseModule {
// Create Socket.IO connection (will automatically use /socket.io endpoint)
this.socket = window.io(socketUrl, {
reconnection: false, // We handle reconnection ourselves
transports: ['websocket', 'polling'] // Prefer WebSocket
transports: ['polling', 'websocket']
});
this.socket.on('connect', () => {
@@ -573,8 +573,8 @@ class SocketClientModule extends BaseModule {
return this.callGameApi('newGame', []);
}
loadGame(slot = 1) {
return this.callGameApi('loadGame', [slot]);
loadGame(slot = 1, savedState = null) {
return this.callGameApi('loadGame', savedState ? [slot, savedState] : [slot]);
}
saveGame(slot = 1) {