mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
MISC: Support importing Steam Cloud save file manually (#2583)
This commit is contained in:
@@ -23,7 +23,7 @@ import { pushGameSaved, pushImportResult } from "./Electron";
|
||||
import { getGoSave, loadGo } from "./Go/SaveLoad";
|
||||
import { SaveData } from "./types";
|
||||
import { SaveDataError, canUseBinaryFormat, decodeSaveData, encodeJsonSaveString } from "./utils/SaveDataUtils";
|
||||
import { isBinaryFormat } from "../electron/saveDataBinaryFormat";
|
||||
import { decodeBase64BytesToBytes, isBinaryFormat, isSteamCloudFormat } from "../electron/saveDataBinaryFormat";
|
||||
import { downloadContentAsFile } from "./utils/FileUtils";
|
||||
import { handleGetSaveDataInfoError } from "./utils/ErrorHandler";
|
||||
import { isObject, assertObject } from "./utils/TypeAssertion";
|
||||
@@ -346,6 +346,9 @@ class BitburnerSaveObject implements BitburnerSaveObjectType {
|
||||
if (isBinaryFormat(rawData)) {
|
||||
return rawData;
|
||||
}
|
||||
if (isSteamCloudFormat(rawData)) {
|
||||
return decodeBase64BytesToBytes(rawData);
|
||||
}
|
||||
return new TextDecoder().decode(rawData);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user