generated from nhcarrigan/template
feat: add sync new content debug tool
Adds a new debug panel button that injects any adventurers, quests, bosses, equipment, upgrades, achievements, zones, and exploration areas that exist in the current game data but are missing from an existing player save (e.g. content added after the save was first created).
This commit is contained in:
@@ -28,6 +28,7 @@ import type {
|
||||
PublicProfileResponse,
|
||||
SaveRequest,
|
||||
SaveResponse,
|
||||
SyncNewContentResponse,
|
||||
TranscendenceRequest,
|
||||
TranscendenceResponse,
|
||||
UpdateProfileRequest,
|
||||
@@ -267,6 +268,16 @@ const forceUnlocks = async(): Promise<ForceUnlocksResponse> => {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Syncs any content added after the player's save was created into their save.
|
||||
* @returns The updated game state and counts of what was added per content type.
|
||||
*/
|
||||
const syncNewContent = async(): Promise<SyncNewContentResponse> => {
|
||||
return await fetchJson<SyncNewContentResponse>("/debug/sync-new-content", {
|
||||
method: "POST",
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Performs a complete hard reset of the player's game state via the debug endpoint.
|
||||
* @returns The fresh game state as a LoadResponse.
|
||||
@@ -309,6 +320,7 @@ export {
|
||||
craftRecipe,
|
||||
debugHardReset,
|
||||
forceUnlocks,
|
||||
syncNewContent,
|
||||
getAbout,
|
||||
getAuthUrl,
|
||||
getPublicProfile,
|
||||
|
||||
Reference in New Issue
Block a user