mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Fix hub being removable after restoring a game, fix tslint errors
This commit is contained in:
@@ -128,7 +128,6 @@ export class SavegameSerializer {
|
||||
if (!verifyResult.result) {
|
||||
return ExplainedResult.bad(verifyResult.reason);
|
||||
}
|
||||
console.log("SAVEGAME:", savegame);
|
||||
let errorReason = null;
|
||||
|
||||
errorReason = errorReason || root.entityMgr.deserialize(savegame.entityMgr);
|
||||
|
||||
@@ -18,10 +18,9 @@
|
||||
* camera: any,
|
||||
* time: any,
|
||||
* entityMgr: any,
|
||||
* entities: {
|
||||
* resources: Array<SerializedMapResource>,
|
||||
* buildings: Array<any>
|
||||
* }
|
||||
* map: any,
|
||||
* hubGoals: any,
|
||||
* entities: Array<any>
|
||||
* }} SerializedGame
|
||||
*/
|
||||
|
||||
|
||||
@@ -33,12 +33,8 @@ export class SerializerInternal {
|
||||
*/
|
||||
deserializeEntityArray(root, array) {
|
||||
for (let i = 0; i < array.length; ++i) {
|
||||
const errorState = this.deserializeEntity(root, array[i]);
|
||||
if (errorState) {
|
||||
return errorState;
|
||||
}
|
||||
this.deserializeEntity(root, array[i]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user