mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-10-21 02:44:46 -04:00
stop timer upon lifting triforce, not upon warping to credits (#7385)
This commit is contained in:
@@ -293,6 +293,7 @@ void LoadStatsVersion1() {
|
||||
SaveManager::Instance->LoadData("fileCreatedAt", gSaveContext.ship.stats.fileCreatedAt);
|
||||
SaveManager::Instance->LoadData("playTimer", gSaveContext.ship.stats.playTimer);
|
||||
SaveManager::Instance->LoadData("pauseTimer", gSaveContext.ship.stats.pauseTimer);
|
||||
SaveManager::Instance->LoadData("gameComplete", gSaveContext.ship.stats.gameComplete);
|
||||
SaveManager::Instance->LoadArray(
|
||||
"itemTimestamps", ARRAY_COUNT(gSaveContext.ship.stats.itemTimestamp),
|
||||
[](size_t i) { SaveManager::Instance->LoadData("", gSaveContext.ship.stats.itemTimestamp[i]); });
|
||||
@@ -343,6 +344,7 @@ void SaveStats(const SaveContext& saveContext, int sectionID, bool fullSave) {
|
||||
SaveManager::Instance->SaveData("fileCreatedAt", saveContext.ship.stats.fileCreatedAt);
|
||||
SaveManager::Instance->SaveData("playTimer", saveContext.ship.stats.playTimer);
|
||||
SaveManager::Instance->SaveData("pauseTimer", saveContext.ship.stats.pauseTimer);
|
||||
SaveManager::Instance->SaveData("gameComplete", saveContext.ship.stats.gameComplete);
|
||||
SaveManager::Instance->SaveArray(
|
||||
"itemTimestamps", ARRAY_COUNT(saveContext.ship.stats.itemTimestamp),
|
||||
[&](size_t i) { SaveManager::Instance->SaveData("", saveContext.ship.stats.itemTimestamp[i]); });
|
||||
|
||||
@@ -2743,9 +2743,6 @@ void RandomizerOnPlayerUpdateHandler() {
|
||||
// Warp to credits once item queue has drained to avoid losing queued items
|
||||
if (GameInteractor::State::TriforceHuntCreditsWarpActive && randomizerQueuedChecks.empty() &&
|
||||
randomizerQueuedCheck == RC_UNKNOWN_CHECK) {
|
||||
gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_TRIFORCE_COMPLETED] =
|
||||
static_cast<u32>(GAMEPLAYSTAT_TOTAL_TIME);
|
||||
gSaveContext.ship.stats.gameComplete = 1;
|
||||
Play_PerformSave(gPlayState);
|
||||
Notification::Emit({ .message = "Game autosaved" });
|
||||
gPlayState->nextEntranceIndex = ENTR_CHAMBER_OF_THE_SAGES_0;
|
||||
|
||||
@@ -1398,6 +1398,9 @@ extern "C" u16 Randomizer_Item_Give(PlayState* play, GetItemEntry giEntry) {
|
||||
}
|
||||
break;
|
||||
case RG_TRIFORCE:
|
||||
gSaveContext.ship.stats.itemTimestamp[TIMESTAMP_TRIFORCE_COMPLETED] =
|
||||
static_cast<u32>(GAMEPLAYSTAT_TOTAL_TIME);
|
||||
gSaveContext.ship.stats.gameComplete = 1;
|
||||
GameInteractor_SetTriforceHuntCreditsWarpActive(true);
|
||||
break;
|
||||
case RG_TRIFORCE_PIECE:
|
||||
|
||||
Reference in New Issue
Block a user