Commit Graph

8 Commits

Author SHA1 Message Date
Olivier Gagnon
48f80f25d6 fmt and lint 2022-04-06 19:30:08 -04:00
Martin Fournier
d386528627 Add support for Steam Cloud & local filesystem
Adds actions to save the game's data directly in the filesystem and/or
into Steam Cloud. Them game will push an event with the save data
whenever the game is saved. Electron will use that data to persist it
into the User Data folder, until the folder reaches a certain size.
Once over the quota, it's going to remove previous saves.

Files are grouped according the the player's identifier, ensuring
backups off different playthroughs if importing.

Optionally, the file will be gzipped before saving to disk, largely
reducing file size.

Adds a way to save & load from Steam Cloud, currently manually only.

When loading a save, it'll trigger the new "Import Data Comparison" page
to accept or cancel the import.

When saving the game, it will save to Steam Cloud & to filesystem if the
options are enabled.

Add automatic game restore

Detects when the player has access to a newer game that has been saved
more recently than the one being loaded. It checks both in the Steam
Cloud and on the local filesystem. Adds an option to disable the
feature.

- Adds a "Save Game" menu item that triggers the game's save.
- Adds a "Export Game" menu item that triggers the download file popup.
- Adds a "Export Scripts" menu item that triggers the "download *"
terminal command.
- Adds a "Load Last Save" menu item that loads the latest file modified
in the user data folder.
- Adds a "Load from Steam Cloud" menu item.
- Adds a "Load From File" menu item that popups a file selector & loads
the file.
- Adds settings for "Saves Compression (.gz)", "Auto-save Backups" &
"Auto-save to Steam", toggleable through the menu.
- Adds a "Open Game Data","Open Saves", "Open Logs" & "Open User Data" menu items.
- Adds a "Quit" menu item.
2022-01-26 03:56:19 -05:00
Heikki Aitakangas
f8e64a1b4f Reduce log level for the all achievements and player achievements listings 2022-01-14 23:41:01 +02:00
Heikki Aitakangas
c7c303c551 Handle Steam achievement status check failure by logging them 2022-01-14 23:41:01 +02:00
Heikki Aitakangas
521889b027 Fix Steam version trying to record every achievement player has every second 2022-01-14 23:40:59 +02:00
Martin Fournier
8192ab09ef Handle greenworks.init() errors gracefully
Since we are only using it to track achievements, we can still launch
the game if it fails to initialize, we just have to not run the
achievements interval.

Adds a dialog that tells the user to fix the issue & restart the game to
enable achievements.
2022-01-14 06:06:59 -05:00
Martin Fournier
674d8a3f06 Include electron-log in achievements file
When the timer throws an exception, it tried to log the error but log
was not defined.
2022-01-05 14:17:54 -05:00
Martin Fournier
a098289856 Refactor electron app into multiple files
Gracefully handle http-server start error & cleanup logs
2021-12-29 08:46:56 -05:00