Skip to content

Move setting of Save context flags from Patches to Savecontext#2367

Merged
fenhl merged 2 commits into
OoTRandomizer:Devfrom
GSKirox:save_flags
Jun 1, 2025
Merged

Move setting of Save context flags from Patches to Savecontext#2367
fenhl merged 2 commits into
OoTRandomizer:Devfrom
GSKirox:save_flags

Conversation

@GSKirox

@GSKirox GSKirox commented Jan 24, 2025

Copy link
Copy Markdown
Collaborator

Another PR with the goal of cleaning Patches.py a tiny bit.
Instructions that write initial save context flags have been regrouped and divided in two functions moved in SaveContext.py :

  • write_qol_save_context_flags, which are currently always on whatever the settings chosen. Since they don't use any other data, this can be a member of SaveContext.
  • write_settings_dependent_save_context_flags for the rest, in a function separate of the class.

I chose to let a couple of these flags in Patches.py if they were part of a bigger code block for their specific settings, since i felt it would make it less readable if that flag was set somewhere else.

This should be strictly indentical in behaviour, barring of course any mistake.

@GSKirox GSKirox added Status: Needs Review Someone should be looking at it Status: Needs Testing Probably should be tested Status: Under Consideration Developers are considering whether to accept or decline the feature described Component: Patching Affects the patching of the ROM Type: Maintenance Code style, infrastructure, updating dependencies labels Jan 24, 2025
@fenhl fenhl removed the Status: Under Consideration Developers are considering whether to accept or decline the feature described label Feb 24, 2025
Comment thread SaveContext.py Outdated
Comment thread SaveContext.py Outdated
Comment thread SaveContext.py Outdated
Co-authored-by: Fenhl <fenhl@fenhl.net>
@fenhl fenhl removed the Status: Needs Review Someone should be looking at it label Apr 20, 2025
@fenhl

fenhl commented May 18, 2025

Copy link
Copy Markdown
Collaborator

Generated some sample seeds to compare to current Dev (with seed salting disabled to allow direct comparisons) and while the generated roms are not literally identical due to the order of items in SaveContext.save_bits and SaveContext.save_bytes changing, they still seem to be functionally identical.

@fenhl fenhl added Status: Waiting for Release This PR is ready for merge, but we're holding off on it until after the next release and removed Status: Needs Testing Probably should be tested labels May 18, 2025
@fenhl fenhl removed the Status: Waiting for Release This PR is ready for merge, but we're holding off on it until after the next release label Jun 1, 2025
@fenhl fenhl added this to the next milestone Jun 1, 2025
@fenhl fenhl merged commit 0fadf60 into OoTRandomizer:Dev Jun 1, 2025
@GSKirox GSKirox deleted the save_flags branch June 9, 2025 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Patching Affects the patching of the ROM Type: Maintenance Code style, infrastructure, updating dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants