Fix not being able to replace balts

This commit is contained in:
Tobias Springer 2020-05-10 18:59:42 +02:00
parent 5f3ffd42fd
commit d2864e7385
1 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ export class GameLogic {
const staticComp = original.components.StaticMapEntity;
assert(staticComp, "Building is not static");
const beltComp = original.components.Belt;
if (beltComp) {
if (beltComp && building instanceof MetaBeltBaseBuilding) {
// Its a belt, check if it differs in either rotation or rotation variant
if (staticComp.rotation !== rotation) {
return true;
@ -114,7 +114,7 @@ export class GameLogic {
}
}
return false;
return true;
}
/**