hm
This commit is contained in:
parent
cefa2ace5a
commit
0e432c62ae
87 changed files with 4282 additions and 3066 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue