Dedicated classes for grouped files/SFX#570
Merged
Endaris merged 12 commits intopanel-attack:betafrom Dec 30, 2024
Merged
Conversation
Endaris
added a commit
that referenced
this pull request
Jan 2, 2025
* initial draft for SfxGroup file matching * add test cases and fix file matching * move getMatchingFiles function to FileUtils * move test file * use file name matching routine for loading single panels and add tests + some cleanup * finish FileGroup and SfxGroup more or less? * start integrating SfxGroup with Character * fix taunts not playing * replace subSfx loading with loading SfxGroups instead * fix crash when playing shock sfx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Mainly created as an intermediate step to facilitate #542
The primary intention is to create an intermediary step of finding the files that will be used to load the respective love userdata.
By creating and keeping a reference to the files and grouping them into the sensible units they are it becomes possible to identify whether the overall getup of a file group changed before even doing a file-by-file comparison, addressing both point 1 and 2 of the open issues for a drag+drop mod import.
Additionally it has the small advantage of being more intuitive to use. Which is not a lot given that there are no particular features we'd want to add more of these for but the syntax certainly seems nicer and it could tentatively allow to specify volume multipliers per SFX group rather than just for all SFX of a mod as a whole.
Oh, and a new FileUtils function for matching these files along with some tests, which is nice and also being used for loading up panels already. In the future this can be used to load up other existing numbered assets like fanfares, pop sfx which also want to know about file references for the sake of ModImport.
Seems prudent to prototype ModImport with just characters/stages though as they present the most common use case.
I'll keep this open until the current beta hits stable.