This commit is contained in:
33333-33333 2026-06-28 23:07:40 +09:00
commit 0e432c62ae
87 changed files with 4282 additions and 3066 deletions

View file

@ -15,14 +15,13 @@
if (typeof syncTopButtons === "function") syncTopButtons();
}
function syncRestoreDependents(worldRef = global.world, context = {}) {
worldRef?.emit?.("ui:restore-sync", { source: context.source || "restore" });
function syncRestoreDependents(worldRef = global.world) {
renderWorldAfterRestore(worldRef);
}
function restoreSnapshot(snapshot, worldRef = global.world, options = {}) {
const result = Snapshot.restoreSnapshot(snapshot, worldRef);
if (options.syncUi !== false) syncRestoreDependents(worldRef, { source: options.source || "snapshot", snapshotVersion: result?.snapshotVersion || Snapshot.version });
if (options.syncUi !== false) syncRestoreDependents(worldRef);
return result;
}