mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
* Add mode button to main menu * [WIP] Add mode menu. Add factory-based gameMode creation * Add savefile migration, serialize, deserialize * Add hidden HUD elements, zone, and zoom, boundary constraints * Clean up lint issues * Add building, HUD exclusion, building exclusion, and refactor - [WIP] Add ConstantProducer building that combines ConstantSignal and ItemProducer functionality. Currently using temp assets. - Add pre-placement check to the zone - Use Rectangles for zone and boundary - Simplify zone drawing - Account for exclusion in savegame data - [WIP] Add puzzle play and edit buttons in puzzle mode menu * [WIP] Add building, component, and systems for producing and accepting user-specified items and checking goal criteria * Add ingame puzzle mode UI elements - Add minimal menus in puzzle mode for back, next navigation - Add lower menu for changing zone dimenensions Co-authored-by: Greg Considine <gconsidine@users.noreply.github.com>
35 lines
848 B
JavaScript
35 lines
848 B
JavaScript
import { createLogger } from "../../core/logging.js";
|
|
import { RegularGameMode } from "../../game/modes/regular.js";
|
|
import { SavegameInterface_V1008 } from "./1008.js";
|
|
|
|
const schema = require("./1009.json");
|
|
const logger = createLogger("savegame_interface/1009");
|
|
|
|
export class SavegameInterface_V1009 extends SavegameInterface_V1008 {
|
|
getVersion() {
|
|
return 1009;
|
|
}
|
|
|
|
getSchemaUncached() {
|
|
return schema;
|
|
}
|
|
|
|
/**
|
|
* @param {import("../savegame_typedefs.js").SavegameData} data
|
|
*/
|
|
static migrate1008to1009(data) {
|
|
logger.log("Migrating 1008 to 1009");
|
|
const dump = data.dump;
|
|
if (!dump) {
|
|
return true;
|
|
}
|
|
|
|
dump.gameMode = {
|
|
mode: {
|
|
id: RegularGameMode.getId(),
|
|
data: {},
|
|
},
|
|
};
|
|
}
|
|
}
|