Add SaveTimestamp to saveString, used in import

This commit is contained in:
Martin Fournier
2022-01-07 08:58:12 -05:00
parent 79b3bb0f0e
commit 3562671772
3 changed files with 7 additions and 5 deletions
+3 -5
View File
@@ -246,16 +246,14 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
return;
}
const data: ImportData = {
base64: contents,
parsed: parsedSave,
}
// We don't always seem to have this value in the save file. Exporting from the option menu does not set the bonus I think.
const exportTimestamp = parsedSave.data.LastExportBonus;
if (exportTimestamp && exportTimestamp !== '0') {
data.exportDate = new Date(parseInt(exportTimestamp, 10))
const timestamp = parsedSave.data.SaveTimestamp;
if (timestamp && timestamp !== '0') {
data.exportDate = new Date(parseInt(timestamp, 10))
}
setImportData(data)