Add storage-backed story history
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user