implemented save file compression in browser

This commit is contained in:
Altair-sh
2026-09-23 17:26:40 +02:00
parent 54ddc11b44
commit a022dd00dc
25 changed files with 1331 additions and 142 deletions
+20
View File
@@ -0,0 +1,20 @@
// Games the parser backend can handle. The values go into the upload request.
//TODO: add more games
export enum GameEnum {
EU4 = 'eu4',
Stellaris = 'stellaris',
}
/**
* Name the game state gets inside a save archive, per game.
*
* A save produced by the game is either a zip archive holding this file (plus
* companion files like `meta`), or the very same content as plain text. When a
* plain text save is uploaded, this is the name it is stored under, so the
* backend always reads the 'gamestate' or whatever is set for the specific game.
* The parser backend keeps the same map on its side.
*/
export const GAME_SAVE_ENTRY_NAMES: Record<GameEnum, string> = {
[GameEnum.EU4]: 'gamestate',
[GameEnum.Stellaris]: 'gamestate',
}