art(starting): new Starting background; the old one is archived, not lost
Creator supplied a new 2724x1536 image; resampled to the 1920x1080 master and encoded at q3 (2.9 MB → 424 KB, so the shipped asset also got smaller). - `Assets/starting-background.jpg` — the new art, same filename, so nothing else changes - `Assets/archive/starting-background-pre-2026-11-06.jpg` — the previous image, kept in the repo. The csproj lists assets explicitly, so an unreferenced file never ships. - **Existing layouts would have kept the old art forever**: default backgrounds are hash-keyed into the layout DB on first seed, and the seed returns early once an AssetId exists. `HealDefaultArtVersion` bumps `Art.DefaultVersion` to 2 and clears the AssetId of backgrounds still using the DEFAULT (a creator's custom background is skipped), so the next load re-stamps the new image. Background tests: 44 passed.
This commit is contained in:
@@ -427,9 +427,30 @@ public partial class MainViewModel
|
||||
/// <summary>Heals every scene to the locked Background model after a layout
|
||||
/// load: keeps the correct flavor per scene at index 0 named "Background",
|
||||
/// drops duplicates/stale rows, re-seeds missing ones.</summary>
|
||||
/// <summary>Bump when a bundled background image is replaced. Layouts stamped with an older version
|
||||
/// re-seed their DEFAULT art on next load; a creator's own custom background is never touched.</summary>
|
||||
private const int CurrentDefaultArtVersion = 2;
|
||||
|
||||
/// <summary>Re-stamp the shipped art for scenes still using the default. Without this, a replaced
|
||||
/// <c>starting-background.jpg</c> reaches new installs only: the asset is hash-keyed into the layout
|
||||
/// database on first seed, so an existing profile keeps showing the old image forever.</summary>
|
||||
private void HealDefaultArtVersion()
|
||||
{
|
||||
if (_layoutStore.LoadDefaultArtVersion() >= CurrentDefaultArtVersion) return;
|
||||
|
||||
foreach (var background in AllBackgrounds())
|
||||
{
|
||||
if (!background.UseDefaultBackground) continue; // the creator chose their own art
|
||||
background.AssetId = null; // seed re-stamps it below
|
||||
}
|
||||
|
||||
_layoutStore.SaveDefaultArtVersion(CurrentDefaultArtVersion);
|
||||
}
|
||||
|
||||
private void HealBackgrounds()
|
||||
{
|
||||
NormalizeBackgrounds(Scenes);
|
||||
HealDefaultArtVersion();
|
||||
foreach (var scene in Scenes)
|
||||
{
|
||||
_sceneGraph.InvalidateBake(scene);
|
||||
|
||||
Reference in New Issue
Block a user