Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add saverestore API #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: Add saverestore API #20

wants to merge 1 commit into from

Conversation

JJL772
Copy link
Member

@JJL772 JJL772 commented Aug 16, 2024

P2CE save-restore API. Not merged into the engine yet.

@koerismo koerismo added awaiting implementation This API requires engine-side implementation. Proposal Proposing a new feature or enhancement. labels Aug 16, 2024
@JJL772 JJL772 requested a review from koerismo August 21, 2024 14:06
/**
* Defines the save type, used with 'GameSaved' event in the 'type' parameter
*/
declare enum SaveType {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to use declare const enum, unless SaveType is defined in the global scope.

@@ -88,4 +88,5 @@ interface GlobalEventNameMap {
'UnloadLoadingScreenAndReinit': () => void,
'AchievementInfoLoaded': () => void,
'AchievementEarned': (player_index: number, achievement_index: number) => void,
'GameSaved': (save_name: string, save_type: number) => void,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use save_type: SaveType instead of save_type: number here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting implementation This API requires engine-side implementation. Proposal Proposing a new feature or enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants