-
Notifications
You must be signed in to change notification settings - Fork 751
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
LttP, Core: Fixes patching LttP on a fresh AP install #2118
LttP, Core: Fixes patching LttP on a fresh AP install #2118
Conversation
I was able to patch an ALttP ROM using this branch. |
Yeah, when getting the adjuster settings it now populates it with the default, so it checking for an empty dict will now always trigger, as the dict is populated and bring up the UI. |
I can improve the behavior. Could I get a description for what is supposed to happen? If you’ve never used the adjuster, don’t save settings and don’t show the UI? Or is the new behavior intended/desired?Sent from my iPhoneOn Aug 22, 2023, at 11:45 AM, Fabian Dill ***@***.***> wrote:
Yeah, when getting the adjuster settings it now populates it with the default, so it checking for an empty dict will now always trigger, as the dict is populated and bring up the UI.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Restoring the old behaviour would be appropriate - if no custom adjuster settings exist, skip the UI |
Ok, I think I fixed things up now:
Edit: this allows removing some getattr :) |
Possible further improvements:
|
Someone who's a better writer than me should come up with nicer help text. :) |
if vars(Utils.get_adjuster_settings_no_defaults(GAME_ALTTP)): | ||
last_settings = Utils.get_adjuster_settings(GAME_ALTTP) | ||
|
||
allow_list = {"music", "menuspeed", "heartbeep", "heartcolor", "ow_palettes", "quickswap", |
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.
This list should really just go away - hardly anyone uses text mode, I would guess - and I'd much rather just hide options we don't want to show, rather than hard code a list of special args.
choice = 'no' | ||
if not hasattr(last_settings, 'auto_apply') or 'ask' in last_settings.auto_apply: | ||
if 'ask' in last_settings.auto_apply: |
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.
Giving some side-eye to all this if x in y
from worlds.alttp.Rom import get_base_rom_path | ||
last_settings.rom = romfile | ||
last_settings.baserom = get_base_rom_path() | ||
last_settings.world = None | ||
|
||
if hasattr(last_settings, "sprite_pool"): | ||
if last_settings.sprite_pool: |
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.
I think there was maybe a bug here if you had an empty sprite_pool before.
if sprite_pool: | ||
printed_options["sprite_pool"] = sprite_pool | ||
|
||
sprite_pool = {} |
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.
Ditto for removing this special case. Just show the pool as it exists in the yaml
def get_rom_options_frame(parent=None): | ||
adjuster_settings = get_adjuster_settings(GAME_ALTTP) | ||
defaults = { |
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.
Hooray, no more duplicated default args.
I was able to patch an ALttP ROM using this branch. |
What is this fixing or adding?
Cleans up usage of lttp adjuster settings and hardcoded values that could be different than the manual calls to the adjuster. Also implements --disablemusic properly
How was this tested?
Genned. After the first patch, settings appeared to be kosher. Mucked around with the --(disable)music option a bit
If this makes graphical changes, please attach screenshots.