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

Fix for CustomKnight not working in MoreSaves's additional save files. #43

Merged
merged 6 commits into from
Jul 29, 2024

Conversation

OneTwoMint
Copy link
Contributor

@OneTwoMint OneTwoMint commented May 18, 2024

Fixes bug where CustomKnight doesn't work in saves past slot four by swapping the array that associates skins with a specific save slot (saveSkins) for a dictionary with integer keys (starting from 0 to keep compatibility with existing array calls). If a file is loaded that does not have an entry in the dictionary, it is given one.

In my own testing this fix works cleanly. All four base slots work fine, and doing weird stuff like loading slot 7 without ever loading 5 seems to work as well as it should. Skins are loaded and saved appropriately.

(Commits are a bit of a mess. It's my first time working with GitHub.)

OneTwoMint and others added 6 commits May 18, 2024 15:55
Affects the system to load skins associated with a specific file slot. Fixes the bug of CustomKnight not working with MoreSaves in files past the default 4. Stores skins associated with each slot as a Dictionary rather than an Array, with the slot number (starting from 0 to be consistent with existing array calls) being the key value and returning the relevant skin. If a save slot is loaded that does not currently have an entry in the Dictionary, it will be given the appropriate entry.
Affects the system to load skins associated with a specific file slot. Fixes the bug of CustomKnight not working with MoreSaves in files past the default 4. Stores skins associated with each slot as a Dictionary rather than an Array, with the slot number (starting from 0 to be consistent with existing array calls) being the key value and returning the relevant skin. If a save slot is loaded that does not currently have an entry in the Dictionary, it will be given the appropriate entry.
Affects the system to load skins associated with a specific file slot. Fixes the bug of CustomKnight not working with MoreSaves in files past the default 4. Stores skins associated with each slot as a Dictionary rather than an Array, with the slot number (starting from 0 to be consistent with existing array calls) being the key value and returning the relevant skin. If a save slot is loaded that does not currently have an entry in the Dictionary, it will be given the appropriate entry. Should have minimal impact on play without MoreSaves.
@PrashantMohta PrashantMohta merged commit e21dba0 into PrashantMohta:master Jul 29, 2024
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