18#ifndef INCLUDED_SAVEDGAME
19#define INCLUDED_SAVEDGAME
30namespace Script {
class Interface; }
Public API for simulation system.
Definition: Simulation2.h:57
Definition: Interface.h:93
Definition: SavedGame.h:45
JS::Value GetSavedGames(const Script::Interface &scriptInterface)
Get list of saved games for GUI script usage.
Definition: SavedGame.cpp:282
std::optional< LoadResult > Load(const Script::Interface &scriptInterface, const std::wstring &name)
Load saved game archive with the given name.
Definition: SavedGame.cpp:236
bool DeleteSavedGame(const std::wstring &name)
Permanently deletes the saved game archive with the given name.
Definition: SavedGame.cpp:336
Status Save(const CStrW &name, const CStrW &description, CSimulation2 &simulation, const Script::StructuredClone &guiMetadataClone)
Create new saved game archive with given name and simulation data.
Definition: SavedGame.cpp:80
Status SavePrefix(const CStrW &prefix, const CStrW &description, CSimulation2 &simulation, const Script::StructuredClone &guiMetadataClone)
Create new saved game archive with given prefix and simulation data.
Definition: SavedGame.cpp:65
Abstraction around a SpiderMonkey JSContext.
Definition: DapInterface.h:32
std::shared_ptr< JSStructuredCloneData > StructuredClone
Structured clones are a way to serialize 'simple' JS::Values into a buffer that can safely be passed ...
Definition: StructuredClone.h:39
std::int64_t Status
Error handling system.
Definition: status.h:174
Definition: SavedGame.h:69
JS::Value metadata
Definition: SavedGame.h:72
std::string savedState
Definition: SavedGame.h:75