Skip to content
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

Merged
merged 4 commits into from
Jun 29, 2024

Conversation

lahm86
Copy link
Collaborator

@lahm86 lahm86 commented Jun 28, 2024

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.

lahm86 added 3 commits June 27, 2024 18:15
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.
@lahm86 lahm86 added the enhancement New feature or request label Jun 28, 2024
@lahm86 lahm86 added this to the 1.9.2 milestone Jun 28, 2024
@lahm86 lahm86 self-assigned this Jun 28, 2024
@lahm86 lahm86 requested review from rr-, chreden and makotocchi June 28, 2024 15:10
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).
Copy link
Collaborator

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;
Copy link

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.

Copy link
Collaborator Author

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.

@lahm86 lahm86 merged commit 5361dad into LostArtefacts:master Jun 29, 2024
2 checks passed
@lahm86 lahm86 deleted the issue-719-integrity-checks branch June 29, 2024 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve integrity checks
3 participants