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

Cow breeding pen broken by trading (potentially) #385

Closed
jeremyckahn opened this issue Jan 25, 2023 · 0 comments · Fixed by #386
Closed

Cow breeding pen broken by trading (potentially) #385

jeremyckahn opened this issue Jan 25, 2023 · 0 comments · Fixed by #386
Assignees
Labels
bug Something isn't working

Comments

@jeremyckahn
Copy link
Owner

A user reported that their save file got corrupted and it caused the game to crash when navigating to the Cows page.

i dont exactly recall what happened but i believe i clicked on offer and had two cows in breeding pen and the next time i loaded the game i was facing this error. Also for some reason i have the legendary rainbow cow in my shed and it says "Original owner: Cheerful Dove".

My theory is that the player offered a cow for trade that was in their breeding pen, a connected peer tried to make a trade, but then the trade sequence wasn’t able to complete for some reason (likely one of the players closed the game or lost connection before it finished).

What’s puzzling about this is that the UI prevents the user from offering a cow for trade that’s already in the breeding pen, and likewise prevents a cow from being moved to the breeding pen that’s offered for trade. So, it’s unclear how this corrupt state was achieved.

Corrupt save file data: https://gist.github.com/jeremyckahn/69b9ee85c07d93bce035086b2271586d

@jeremyckahn jeremyckahn self-assigned this Jan 28, 2023
@jeremyckahn jeremyckahn added the bug Something isn't working label Jan 28, 2023
jeremyckahn added a commit that referenced this issue Jan 29, 2023
* fix: [#385] allow any eligible cow to be moved to breeding pen
* fix: [#385] avoid adding cows not in the inventory to the breeding pen
* test: validate that cow not in inventory cannot be moved to breeding pen
* refactor: rename id to playerId in Subheader component
* refactor: simplify changeCowBreedingPenResident
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant