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

Migrate old savegames

This commit is contained in:
tobspr
2020-09-22 09:32:31 +02:00
parent 665360c5a5
commit 9075841768
15 changed files with 1243 additions and 958 deletions

View File

@@ -86,7 +86,10 @@ export function getCodeFromBuildingData(metaBuilding, variant, rotationVariant)
const hash = metaBuilding.getId() + "/" + variant + "/" + rotationVariant;
const result = variantsCache.get(hash);
if (G_IS_DEV) {
assertAlways(!!result, "Building not found by data: " + hash);
if (!result) {
console.warn("Known hashes:", Array.from(variantsCache.keys()));
assertAlways(false, "Building not found by data: " + hash);
}
}
return result;
}

View File

@@ -16,8 +16,6 @@ export const beltOverlayMatrices = {
[enumDirection.right]: generateMatrixRotations([0, 0, 0, 0, 1, 1, 0, 1, 0]),
};
export class MetaBeltBaseBuilding extends MetaBuilding {}
export class MetaBeltBuilding extends MetaBuilding {
constructor() {
super("belt");

View File

@@ -68,6 +68,10 @@ export class HUDEntityDebugger extends BaseHUDPart {
* @param {Array} recursion
*/
propertyToHTML(name, val, indent = 0, recursion = []) {
if (indent > 20) {
return;
}
if (val !== null && typeof val === "object") {
// Array is displayed like object, with indexes
recursion.push(val);

File diff suppressed because it is too large Load Diff