Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions p2ce/events.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
*/

interface GlobalEventNameMap {
AchievementInfoLoaded: () => void;
AchievementEarned: (player_index: number, achievement_index: number) => void;
GameSaved: (save_name: string, save_type: SaveType) => void,
AchievementInfoLoaded: () => void;
AchievementEarned: (player_index: number, achievement_index: number) => void;
OnSaveMapVersionMismatch: (mapName: string) => void;
OnSaveBegin: (saveName: string) => void;
OnAutoSaveBegin: (saveName: string) => void;
OnAutoSaveDangerousBegin: (saveName: string) => void;
OnSaveBlocked: (saveName: string) => void;
OnSaveFinished: (saveName: string) => void;
OnAutoSaveDangerousMarkedSafe: () => void;
Comment thread
iamsirenstorm marked this conversation as resolved.
}
8 changes: 7 additions & 1 deletion p2ce/gamesaves.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
interface GameSave {
name: string; // Name of this save, used to load, delete, or otherwise refer to this save
chapter: number; // Chapter this save belongs to under P2:CE's Campaign API
comment: string;
elapsedSeconds: number;
Expand All @@ -10,12 +11,17 @@ interface GameSave {
isSavedInCloud: boolean;
mapGroup: string; // Campaign ID this save belongs to under P2:CE's Campaign API
mapName: string; // Map this save was created on
screenshotFileName: string; // Full path from the base game directory to the .sav file
screenshotFileName: string; // Full path from the base game directory to the .tga file
screenshotPath: string; // Panorama path to the screenshot file
}

declare namespace GameSavesAPI {
function GetGameSaves(): Array<GameSave>;
function GetGameSave(name: string): GameSave | null;
function CreateSaveGame(): void;
function CreateNamedSave(name: string): void;
function LoadSaveGame(name: string): void;
function DeleteSaveGame(name: string): void;
function IsSaveInProgress(): boolean;
function IsAutosaveInProgress(): boolean;
}
38 changes: 0 additions & 38 deletions p2ce/saverestore.d.ts

This file was deleted.