Keep a won fight in the record when restarting its reward screen #334
No reviewers
Labels
No labels
4-29
bug
documentation
duplicate
enhancement
flow improvement
good first issue
help wanted
invalid
investigating
issue-agent
issue-agent-blocked
issue-agent-complete
issue-agent-pr-open
issue-agent-runner-nelsonlaptop
issue-agent-runner-nelsonpc
issue-agent-runner-nelsonpc-user
issue-agent-running
needs-verification
next to do
question
queue
recon
relics-stats-onboarding
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/spirelens!334
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/restart-rewind-matches-prefinished-save"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
At combat victory the game marks the room pre-finished and awaits
SaveRun(room)before raisingCombatEnded, so "Restart this combat rewards" replays the reward screen with the fight kept.RoomResetterstill calledRollBackToRoomEntry, restoring the snapshot taken atAfterRoomEntered— before the fight — erasing the fight's promoted stats while the game kept its results. Same for "event rewards" after an event-spawned fight, and for a finished Ancient event (EventRoom.OnEventStateChangedsaves afterRelicCmd.Obtain).Fix
RunTracker.OnCombatEnded: after promotion, retake the rewind snapshot whenroom.IsPreFinished(losses never mark the room). No stacked-room skip, so event-spawned fights are covered.AncientEventRewindSnapshotPatchonEventRoom.OnEventStateChanged: retakes whenIsPreFinishedflips false → true.GameWritesRunSave(), mirroringRunSaveManager.SaveRun'sShouldSave && (Singleplayer || Host).RoomResettercomments updated (snapshot is disk-persisted; rest sites/treasure rooms are offered; pre-finished rooms are offered, not refused).Validation
Built, deployed, hot-reloaded:
Core.Initialize complete,436 classes patched, 0 failed/skipped,EventRoom.OnEventStateChangedin the patched-methods list. Tests and live behavioral verification not run (user-owned).