mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Fix bug where belts' blueprintSpriteKey was never updated when rotation changed.
This commit is contained in:
parent
03670eb403
commit
c324d0e695
@ -130,7 +130,25 @@ export class MetaBeltBaseBuilding extends MetaBuilding {
|
|||||||
entity.components.Belt.direction = arrayBeltVariantToRotation[rotationVariant];
|
entity.components.Belt.direction = arrayBeltVariantToRotation[rotationVariant];
|
||||||
entity.components.ItemEjector.slots[0].direction = arrayBeltVariantToRotation[rotationVariant];
|
entity.components.ItemEjector.slots[0].direction = arrayBeltVariantToRotation[rotationVariant];
|
||||||
|
|
||||||
entity.components.StaticMapEntity.spriteKey = null;
|
const staticComp = entity.components.StaticMapEntity;
|
||||||
|
staticComp.spriteKey = null;
|
||||||
|
switch (arrayBeltVariantToRotation[rotationVariant]) {
|
||||||
|
case enumDirection.top: {
|
||||||
|
staticComp.blueprintSpriteKey = "sprites/blueprints/belt_top.png";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case enumDirection.left: {
|
||||||
|
staticComp.blueprintSpriteKey = "sprites/blueprints/belt_left.png";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case enumDirection.right: {
|
||||||
|
staticComp.blueprintSpriteKey = "sprites/blueprints/belt_right.png";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
assertAlways(false, "Invalid belt rotation variant");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user