[BUGFIX] Made the chart editor use correct song IDs when using templates #3018
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instead of always using the song name from the metadata to infer the song ID, the chart editor will now try to use the correct song ID when loading a song template, and will only use the song name to infer the song ID as a fallback (usually when you create a new song or open a
.fnfc
file).This fix helps song scripts load on all variations when playtesting, and not only on variations where the song name matches the song ID (usually
default
). You can see the effect very clearly when playtesting eggnog on theerect
variations with song scripts enabled because the cutscene that's supposed to play when the song ends won't play without this fix.Note
Previously, I tried to apply this functionality to
.fnfc
files as well, by using the song ID from the manifest file, but then I realized that this prevents the user from editing the song ID of an opened.fnfc
file, so I ended up reverting that functionality.