Skip to content

Add 'defaults' option. - #41

Open
richrd wants to merge 1 commit into
masterfrom
feat/default-mods
Open

Add 'defaults' option.#41
richrd wants to merge 1 commit into
masterfrom
feat/default-mods

Conversation

@richrd

@richrd richrd commented May 5, 2026

Copy link
Copy Markdown
Member

Add option for applying default mods.

@richrd
richrd marked this pull request as ready for review May 16, 2026 09:00
@richrd
richrd requested a review from Copilot May 16, 2026 09:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a defaults value to the --options argument of the modify action so users can apply a curated set of recommended mods with a single keyword instead of listing them all individually. The README is updated to document the new shortcut, and the internal option-matching code is refactored to operate on a local options variable (using set intersection for DB-mod detection) so the new expansion flows through unchanged.

Changes:

  • Introduces a DEFAULT_MODS constant and expands --options defaults into that list (rejecting combinations with other options).
  • Replaces the convoluted set(db_actions) - (set(db_actions) - set(args.options)) check with a clearer set intersection, and routes all mod checks through the new options local.
  • Documents the new defaults shortcut and multi-option usage in the README and in --options help text.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
README.md Documents the new defaults option and clarifies that multiple mods can be passed at once.
op1repacker/main.py Adds DEFAULT_MODS, handles the defaults keyword (with a guard against mixing it with other options), and switches mod checks to use the local options variable and a set-intersection-based DB-mod detection.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread op1repacker/main.py
# Support a "defaults" option that applies all suggested mods
options = args.options
if "defaults" in options:
if (len(options) > 1):
Comment thread op1repacker/main.py

# Support a "defaults" option that applies all suggested mods
options = args.options
if "defaults" in options:
Comment thread op1repacker/main.py
if (len(options) > 1):
print('The "defaults" option cannot be combined with other options!')
return
print('Enabled default modifications: ' + ', '.join(DEFAULT_MODS))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants