diff --git a/game.v2025-07-31.bundle.js b/game.v2025-07-31.bundle.js index 75f3656..c728480 100644 --- a/game.v2025-07-31.bundle.js +++ b/game.v2025-07-31.bundle.js @@ -5624,7 +5624,7 @@ () => { E.exportSavegamePrivateBin(); }, - )}"> ${e.T("settings-share-save-button", "Export save without file")}\n
\n --\x3e\n \n \n `; + )}"> ${e.T("settings-share-save-button", "Export save without file")}\n
\n --\x3e\n \n
\n
Named Save
\n
\n \n
\n \n
\n
\n Save a complete export with a custom name.\n
\n \n `; } static mapManagementFormView() { const e = s.getInstance(); @@ -5863,6 +5863,30 @@ }; await _.runExport("pu_save", await _.getSavegameData(t)); } + static async exportNamedSave() { + const save_name = $("#named-save-input").val().trim(); + if (!save_name) return; + const error_obj = { + title: s.getInstance().T("settings-save-export-maps-failed-header", "Save export interrupted"), + text: s.getInstance().T("settings-save-export-maps-failed-content", "During the export an error occured while loading the active maps for a full export."), + }; + const orig_complete = n.getSetting("completeExports"); + const orig_compress = n.getSetting("compressExports"); + n.setSetting("completeExports", true); + n.setSetting("compressExports", true); + try { + const data = await _.getSavegameData(error_obj); + const compressed = n.compressJSObjectToString(data); + const blob = new Blob([compressed], { type: "application/octet-stream" }); + const url = window.URL.createObjectURL(blob); + const a = $(``); + $("body").append(a); + a[0].click(); + setTimeout(() => { window.URL.revokeObjectURL(url); a.remove(); }, 5000); + } catch (e) {} + n.setSetting("completeExports", orig_complete); + n.setSetting("compressExports", orig_compress); + } static async importSaveGameClipboard() { const e = s.getInstance(), t = {