Skip to content

Fix rewirer of mod savedata being put with bad key into dictionary#8

Open
BlastSlimey wants to merge 5 commits into
tobspr-games:developfrom
BlastSlimey:savedata-fixes
Open

Fix rewirer of mod savedata being put with bad key into dictionary#8
BlastSlimey wants to merge 5 commits into
tobspr-games:developfrom
BlastSlimey:savedata-fixes

Conversation

@BlastSlimey

Copy link
Copy Markdown
Contributor

ModSaveDataExtensions.AttachSaveData<T>(...) constructs the key fullname, which is used for putting the ActiveRewirer into the ModSaveDataExtensions.Rewirers dictionary, with an extra .json. That crashes the game whenever ModSaveDataExtensions.GetRewirer<T>(...) is called (and also saves the mod's savedata into a file with double extension).

While looking at it, I also noticed that the ModSaveDataRewirer constructor tries to correct a potential incorrect file extension, but never gets to do it because it checks for the string "json" having an extension.

@lorenzofman-tobspr lorenzofman-tobspr changed the base branch from master to develop June 4, 2026 12:35
@lorenzofman-tobspr lorenzofman-tobspr self-requested a review June 4, 2026 19:09

@lorenzofman-tobspr lorenzofman-tobspr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rebase to the latest develop branch and resolve the conflicts?

@BlastSlimey

BlastSlimey commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

I synced the fork in GitHub, which is now said to be based on the develop branch. Does this suffice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants