Fix not being able to replace balts

pull/33/head
Tobias Springer 4 years ago
parent 5f3ffd42fd
commit d2864e7385

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

Loading…
Cancel
Save