1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Refactor pinned shapes and make them smart, closes #72

This commit is contained in:
tobspr
2020-06-12 18:38:13 +02:00
parent 8c01cc23d0
commit 3af6532d32
11 changed files with 215 additions and 56 deletions

View File

@@ -0,0 +1,28 @@
import { createLogger } from "../../core/logging.js";
import { SavegameInterface_V1002 } from "./1002.js";
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: [] };
}
}

View File

@@ -0,0 +1,5 @@
{
"type": "object",
"required": [],
"additionalProperties": true
}