mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
29 lines
680 B
JavaScript
29 lines
680 B
JavaScript
import { createLogger } from "../../core/logging";
|
|
import { SavegameInterface_V1002 } from "./1002";
|
|
|
|
const schema = require("./1003.json");
|
|
const logger = createLogger("savegame_interface/1003");
|
|
|
|
export class SavegameInterface_V1003 extends SavegameInterface_V1002 {
|
|
getVersion() {
|
|
return 1003;
|
|
}
|
|
|
|
getSchemaUncached() {
|
|
return schema;
|
|
}
|
|
|
|
/**
|
|
* @param {import("../savegame_typedefs.js").SavegameData} data
|
|
*/
|
|
static migrate1002to1003(data) {
|
|
logger.log("Migrating 1002 to 1003");
|
|
const dump = data.dump;
|
|
if (!dump) {
|
|
return true;
|
|
}
|
|
|
|
dump.pinnedShapes = { shapes: [] };
|
|
}
|
|
}
|