harbingerofme / DebugToolkit

Debugging commands for Risk of Rain 2. Previously known as RoR2Cheats.
https://thunderstore.io/package/IHarbHD/DebugToolkit/
BSD 3-Clause "New" or "Revised" License
14 stars 8 forks source link

New Command: prevent_profile_writing #157

Closed SChinchi closed 8 months ago

SChinchi commented 8 months ago

Closes #99

I put it in a new file to leave the door open for list_, grant_, and revoke_ unlockable commands.

Things that trigger a profile save:

So based on what a user has already unlocked, giving yourself unlimited coins and continuing with a full run may still only trigger the save on shutdown much later. This info could go as a note in the readme so people have a clearer expectation of what may save their profile and when, but a terse "enable early and leave on" suffices in my opinion.

This is the most sane way I've thought of implementing it, effectively with a file lock. Freezing StatSheets, unlockable granting, etc for only the duration of the command being enabled would be messy and prone to bugs.