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

Fix for freeEntityAreaBeforeBuild function.

Small typo that brings big bug with it. If you try to replace replaceable entity with wired pins, using unreplaceable entity with wired pins, it crashes because it is looking for "replacing entity" instead of "replaced entity".
This commit is contained in:
TcePrepK 2022-02-25 17:38:14 +03:00 committed by GitHub
parent 7e436f2f2e
commit f770048938
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -147,7 +147,7 @@ export class WiredPinsSystem extends GameSystemWithFilter {
const worldPos = entity.components.StaticMapEntity.localTileToWorld(slot.pos); const worldPos = entity.components.StaticMapEntity.localTileToWorld(slot.pos);
const collidingEntity = this.root.map.getLayerContentXY(worldPos.x, worldPos.y, "wires"); const collidingEntity = this.root.map.getLayerContentXY(worldPos.x, worldPos.y, "wires");
if (collidingEntity) { if (collidingEntity) {
const staticComp = entity.components.StaticMapEntity; const staticComp = collidingEntity.components.StaticMapEntity;
assertAlways( assertAlways(
staticComp staticComp
.getMetaBuilding() .getMetaBuilding()