-
Notifications
You must be signed in to change notification settings - Fork 7
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
Improve data integrity checks #720
Improve data integrity checks #720
Conversation
Includes checks for when a classic script is in a remastered folder and a public method to access the integrity checker.
The warning message can no longer be ignored, so folders that aren't original cannot be opened. The check is also done on the backup folder before each randomization in case players try to mod that folder instead.
USING.md
Outdated
3. Reinstall the TR game from scratch (e.g. in Steam or GoG). | ||
4. Follow this guide carefully from the [beginning](USING.md#randomizer-setup). | ||
3. Uninstall the TR game from your system (e.g. in Steam or GoG). You should also manually uninstall any third-party modifications you may have applied as these may not be captured by the uninstall process. | ||
4. Reinstall the TR game from scratch (e.g. in Steam of GoG). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Steam or GoG
{ | ||
Unload(); | ||
} | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, if the game detects a malformed version of the game, it deletes files? IMO it should abort and exit immediately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's only the backed up files that the rando creates that are deleted, not the game itself. Getting to this point should not be possible any longer because of the hard stop on the first open. The only way would be if you were to open the rando, then manually fiddle with the backup before randomizing.
The problem is that if we don't delete the backup, and the user reinstalls the game, when they open it in the rando again it won't create a new backup because it already exists. And unfortunately we can't rely on the player following an instruction to manually delete the backup.
I agree though, we would never delete the actual target folder as that's well beyond scope, and that is the step users have to perform themselves.
Resolves #719.
Checklist
Description
Integrity check failures are now non-skippable. As well as the initial check when opening a folder for the first time, a check is also done of the backup folder before each randomization. Updated some wording too re ensuring clean folders, and reinstalling.
I'm planning to move strings (like the long-winded messages here) out of the code eventually, will probably tackle that when revamping the UI in the future.