fix(engine): unify light/dark theme manifest URL resolution
Test / test (pull_request) Successful in 13m4s
Test / test (pull_request) Successful in 13m4s
- set_theme resolved every id to themes:// — the bundled dark/classic themes live at embedded://, so switching to them via the public API would NotFound and silently keep the old theme. All three load paths now share one theme_manifest_url resolver. - load_initial_theme's settings-absent fallback was "classic", a leftover from v0.33 when classic was the default; it now derives from Settings::default() so it can't drift from the data crate again, with a test pinning the default id to a bundled theme. - settings.rs doc no longer claims "classic" is migrated to "dark"; only the pre-rename "default" id is rewritten. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -161,8 +161,10 @@ pub struct Settings {
|
||||
/// Identifier of the active card-art theme. Matches `meta.id` from
|
||||
/// the theme's `theme.ron` manifest. `"dark"` and `"classic"` are
|
||||
/// always present; user-supplied themes register under their own ids.
|
||||
/// Older `settings.json` files that stored `"default"` or `"classic"`
|
||||
/// are migrated to `"dark"` by [`Settings::sanitized`].
|
||||
/// Older `settings.json` files that stored `"default"` (the
|
||||
/// pre-rename id of the dark theme) are migrated to `"dark"` by
|
||||
/// [`Settings::sanitized`]; `"classic"` is a valid player choice
|
||||
/// and is never rewritten.
|
||||
#[serde(default = "default_theme_id")]
|
||||
pub selected_theme_id: String,
|
||||
/// Set to `true` once the achievement-onboarding info-toast has been
|
||||
|
||||
Reference in New Issue
Block a user