1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Fix paste constant

This commit is contained in:
FatCatX 2021-05-05 10:37:13 -07:00
parent 177f50bce8
commit 0753dc536e

View File

@ -36,6 +36,7 @@ export class SerializerInternal {
if (typeof result == "string") { if (typeof result == "string") {
return result; return result;
} }
result.uid = serializedEntity.uid;
root.entityMgr.registerEntity(result, serializedEntity.uid); root.entityMgr.registerEntity(result, serializedEntity.uid);
root.map.placeStaticEntity(result); root.map.placeStaticEntity(result);
} }
@ -64,8 +65,6 @@ export class SerializerInternal {
variant: data.variant, variant: data.variant,
}); });
entity.uid = payload.uid;
const errorStatus = this.deserializeComponents(root, entity, payload.components); const errorStatus = this.deserializeComponents(root, entity, payload.components);
return errorStatus || entity; return errorStatus || entity;
@ -93,7 +92,9 @@ export class SerializerInternal {
} }
const errorStatus = entity.components[componentId].deserialize(data[componentId], root); const errorStatus = entity.components[componentId].deserialize(data[componentId], root);
if (errorStatus) {
return errorStatus; return errorStatus;
} }
} }
} }
}