-
Notifications
You must be signed in to change notification settings - Fork 671
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
Launcher: Allow opening patches for clients without an exe #2176
Conversation
hm, the |
Ahh, right. Maybe something like if c.type == Type.CLIENT and \
isinstance(c.file_identifier, SuffixIdentifier) and \
(c.script_name is None or isfile(get_exe(c)[-1])):
suffixes += c.file_identifier.suffixes If you have a "script name", assume that means you require a root level client to be installed. Otherwise, assume you won't have a root level client and need to whitelist your suffixes here so the launcher can handle them. |
Yeah, something like that should work |
… that aren't installed
Updated. Tested a frozen 3.11 build this time and everything worked as expected. Deleting a couple root-level clients resulted in their suffixes being removed from the Open Patch window. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
…goMW#2176) * Launcher: Allow opening patches for clients without an exe * Launcher: Restore behavior for not showing patch suffixes for clients that aren't installed
…goMW#2176) * Launcher: Allow opening patches for clients without an exe * Launcher: Restore behavior for not showing patch suffixes for clients that aren't installed
What is this fixing or adding?
Right now the "Open Patch" button in the launcher is restricted to only recognize file extensions associated with root-level clients. So the only way for an apworld with a bespoke internal client to open a patch file is to open it directly with the launcher.
This removes the exe requirement, and if no exe is found after the file is identified, the file is given directly to the launcher, which should identify the patch file and run
component.func
inrun_component
.How was this tested?
Dropped a Pokemon Emerald apworld into
worlds/
and was able to open anapemerald
patch file to launch the Emerald client that's inside the apworld. Also verified that anapz5
file still opened and patched correctly. All tested on source only.