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

Problems with data saving overriding other mods #1140

Open
AtomicDonuts opened this issue Feb 20, 2023 · 0 comments
Open

Problems with data saving overriding other mods #1140

AtomicDonuts opened this issue Feb 20, 2023 · 0 comments
Labels

Comments

@AtomicDonuts
Copy link

Bug description

have noticed a problem while working on a mod and using Cookie Monster simultaneously.
It happenes when Cookie Monster's save data in the localStorage is stored before any other mod data.
If the game starts with the mod's data saved, and the page gets refreshed (or closed) before the game is saved (manually or by autosave), all the mods' data stored after the cookieMonsterFramework is deleted.
The issue doesnt occur if the other mods' data is stored before cookieMonster's in the localStorage/Game.WriteSave string.

To reproduce

1)Load any data in the localStorage.CookieClickerGame string after the end of the cookieMonsterFramework data
2)Save the game
3)Refresh the game tab
4)Refresh/Close the tab before the autosave process/without saving the game

Screenshot

No response

Save file

These are the 2 save files
"ModDataBefore" is the save data where CookieMonster data is stored before any other mod data, and then, the files are getting deleted
"ModDataAfter" is the save data where CookieMonster data is after any other mod data, and they are not getting deleted when the bug occurs
ModDataBefore.txt
ModDataAfter.txt

Browser / Steam / Version

Browser 2.048

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant