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:
parent
278f3fd627
commit
6bcad21287
@ -44,14 +44,16 @@ export class MetaBufferBuilding extends MetaBuilding {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// We render the sprite our self
|
||||||
|
entity.components.StaticMapEntity.spriteKey = null;
|
||||||
|
|
||||||
entity.addComponent(
|
entity.addComponent(
|
||||||
new ItemEjectorComponent({
|
new ItemEjectorComponent({
|
||||||
slots: [{ pos: new Vector(1, 0), direction: enumDirection.top }],
|
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.
|
// TODO: Replace item filters with custom filter to only allow one type of item to be collected.
|
||||||
entity.addComponent(
|
entity.addComponent(
|
||||||
|
@ -248,7 +248,6 @@ export class HUDBuildingPlacer extends BaseHUDPart {
|
|||||||
this.currentVariant.set(variant);
|
this.currentVariant.set(variant);
|
||||||
|
|
||||||
this.fakeEntity = new Entity(null);
|
this.fakeEntity = new Entity(null);
|
||||||
metaBuilding.setupEntityComponents(this.fakeEntity, null);
|
|
||||||
|
|
||||||
this.fakeEntity.addComponent(
|
this.fakeEntity.addComponent(
|
||||||
new StaticMapEntityComponent({
|
new StaticMapEntityComponent({
|
||||||
@ -257,6 +256,8 @@ export class HUDBuildingPlacer extends BaseHUDPart {
|
|||||||
tileSize: metaBuilding.getDimensions(this.currentVariant.get()).copy(),
|
tileSize: metaBuilding.getDimensions(this.currentVariant.get()).copy(),
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
metaBuilding.setupEntityComponents(this.fakeEntity, null);
|
||||||
metaBuilding.updateVariants(this.fakeEntity, 0, this.currentVariant.get());
|
metaBuilding.updateVariants(this.fakeEntity, 0, this.currentVariant.get());
|
||||||
|
|
||||||
this.buildingInfoElements.tutorialImage.setAttribute(
|
this.buildingInfoElements.tutorialImage.setAttribute(
|
||||||
|
Loading…
Reference in New Issue
Block a user