mirror of
https://github.com/Shu-Ying/noname-shuying.git
synced 2026-11-24 14:06:29 +08:00
fixed # 修复大量BUG
This commit is contained in:
@@ -74,6 +74,7 @@ const persistModeStorage = (update = () => {}, context = {}) => {
|
||||
receipt.phase = "mutator";
|
||||
update(storage);
|
||||
stripBattleProgress(storage[config.saveKey]);
|
||||
migrateRetiredCards(storage[config.saveKey]);
|
||||
storage.version = lib.version;
|
||||
await writeModeStorage(storage, receipt);
|
||||
receipt.phase = "memory.publish";
|
||||
@@ -99,7 +100,7 @@ const persistModeStorage = (update = () => {}, context = {}) => {
|
||||
const saveRun = async run => {
|
||||
try {
|
||||
// Capture before enqueue: subsequent gameplay mutations cannot alter this save.
|
||||
const snapshot = migrateRetiredCards(stripBattleProgress(copy(run)));
|
||||
const snapshot = copy(run);
|
||||
await persistModeStorage(storage => {
|
||||
storage[config.saveKey] = snapshot;
|
||||
}, { runId: snapshot.runId, revision: snapshot.revision });
|
||||
|
||||
Reference in New Issue
Block a user