Skip to content

Add MCP theme export - #50

Draft
Quantumyilmaz wants to merge 1 commit into
mainfrom
agent/theme-export
Draft

Add MCP theme export#50
Quantumyilmaz wants to merge 1 commit into
mainfrom
agent/theme-export

Conversation

@Quantumyilmaz

@Quantumyilmaz Quantumyilmaz commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds an Export as Theme workflow to the MCP Theme page.
  • Exposes every exportable theme field through MCP, including metadata and advanced special-effect parameters.
  • Exports the live Theme::default_theme values as a formatted JSON theme.
  • Registers a successful export immediately, so clients can request it without using Reload Themes first.

Export behavior

  • Proposes the first available MyThemeN filename, starting with MyTheme1.
  • Lets the user edit the name and automatically appends .json.
  • Rejects invalid Windows filenames, path separators, reserved names, and case-insensitive collisions.
  • Disables Export while the name is invalid or already exists and never overwrites an existing file.
  • Shows the saved path after a successful export.
  • Deliberately omits hide_in_menu and n_max_buttons from exported themes.

Implementation notes

  • Persists the newly editable metadata and special-effect values in MCP settings.
  • Adds localized English strings for the new controls and export modal.
  • Moves the theme-registry lock ahead of lookup in ProcessRequestTheme so runtime registration and requests use the same synchronization.

Verification

  • Debug configuration generated successfully with MSVC/CMake/Ninja.
  • Full Debug compile and link succeeded.
  • git diff --check passed.
  • English translation file remains UTF-16LE with CRLF; exactly the intended 20 rows were added and match the C++ fallbacks.
  • In-game MCP export smoke test.

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.

1 participant