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

Fix bug with StaticMapEntityComponent creation

This commit is contained in:
Jasper Meggitt 2020-05-19 17:20:46 -07:00
parent 278f3fd627
commit 6bcad21287
2 changed files with 6 additions and 3 deletions

View File

@ -44,14 +44,16 @@ export class MetaBufferBuilding extends MetaBuilding {
})
);
// We render the sprite our self
entity.components.StaticMapEntity.spriteKey = null;
entity.addComponent(
new ItemEjectorComponent({
slots: [{ pos: new Vector(1, 0), direction: enumDirection.top }],
})
);
// We render the sprite our self
// entity.components.StaticMapEntity.spriteKey = null;
// TODO: Replace item filters with custom filter to only allow one type of item to be collected.
entity.addComponent(

View File

@ -248,7 +248,6 @@ export class HUDBuildingPlacer extends BaseHUDPart {
this.currentVariant.set(variant);
this.fakeEntity = new Entity(null);
metaBuilding.setupEntityComponents(this.fakeEntity, null);
this.fakeEntity.addComponent(
new StaticMapEntityComponent({
@ -257,6 +256,8 @@ export class HUDBuildingPlacer extends BaseHUDPart {
tileSize: metaBuilding.getDimensions(this.currentVariant.get()).copy(),
})
);
metaBuilding.setupEntityComponents(this.fakeEntity, null);
metaBuilding.updateVariants(this.fakeEntity, 0, this.currentVariant.get());
this.buildingInfoElements.tutorialImage.setAttribute(