Repository navigation
修复设置里改的字号在下次打开游戏时被改回 - #860
Plastic-time wants to merge 5 commits into
Conversation
A work's saved settings carried the text sizes of the moment it was saved, usually the built-in 34 / 30, even when nobody set them for that work. A size changed in Settings while the game was closed reached only the global preset, so the work's copy put the old size back at its next start (ilynthn#800). The running-work fix for ilynthn#119 copied the global sizes into that work, which froze them there for the next change. A work now holds a size only when it was chosen for it: Alt+T, a calibration, or its own page in Settings. Saves leave out a size equal to what the work would start from (built-in defaults plus the home preset) unless the work already held it. Old entries whose sizes are all the old built-in 34 / 30 / 34 drop them and follow Settings. Cloud sync carries the mark, and importing another work's look starts from the global sizes. A global size change while a game runs releases only the changed size of that game, and only when it changed: the page autosaves every field, so a colour change no longer touches them.
|
|
releaseSizes worked on the raw saved entry. For an old entry holding only the copied 34 / 30, changing just the global Japanese size while the game ran removed 34 and stamped sizes:1, which left the copied 30 as the work's own translation size. The entry is normalised first, so the copied pair goes together and the work keeps following Settings.
|
|
|
|
|
这是静态审阅发现,同提交 CI 仍在运行 |
|
|
问题
在设置里改了日文/译文字号,下次打开游戏又变回原来的大小(#800,和 #119 同一类反馈)。每款玩过的游戏,存档里都存着保存那一刻的字号,常常只是默认的 34/30。#119 只把新字号同步进正在运行的那款游戏。游戏没开时改,下次启动就被存档里的旧字号盖回去。#119 那条同步是把全局字号复制进存档,下次再改又冻住了。
改动
sizeSource: "user",就算正好是 34 也保留。限制:旧数据分不清「继承的全局字号」和「特意定成和全局一样的字号」,后者也改为跟随设置。旧版存档之后又在旧版里改过全局字号的,存档里的值和升级时的全局不同,仍算这款游戏自己的;开着这款游戏时在设置里改一次对应的字号,它就改为跟随设置。
新增
validation/issue-800-size.test.cjs,在 main 上 15 项失败、3 项通过,修复后 18 项全过。preserved/app/里的同名代码是 v1.0.0 存档,没跟着改。和 #817 在
services/runtime.cjs等文件有文本冲突。#817 把运行中游戏的设置改成settings.read('text',active),这次的规则在read里,合并时保留 #817 的写法,留下releaseSizes(active,sizes)和sizesBefore两处即可。Closes #800