1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-16 11:41:50 +00:00

respect simplified belts for underlays

This commit is contained in:
EmeraldBlock 2021-11-24 22:54:19 -06:00
parent 24d6238d17
commit 6ea9f91641
2 changed files with 10 additions and 2 deletions

View File

@ -83,6 +83,8 @@ export class AcceptorBeltSystem extends GameSystemWithFilter {
globalConfig.itemSpacingOnBelts
);
const simplifiedBelts = this.root.app.settings.getAllSettings().simplifiedBelts;
const contents = chunk.containedEntitiesByLayer.regular;
for (let i = 0; i < contents.length; ++i) {
const entity = contents[i];
@ -150,7 +152,9 @@ export class AcceptorBeltSystem extends GameSystemWithFilter {
parameters.context.translate(x, y);
parameters.context.rotate(angleRadians);
this.underlayBeltSprites[animationIndex % BELT_ANIM_COUNT].drawCachedWithClipRect(
this.underlayBeltSprites[
!simplifiedBelts ? animationIndex % BELT_ANIM_COUNT : 0
].drawCachedWithClipRect(
parameters,
-globalConfig.halfTileSize,
-globalConfig.halfTileSize,

View File

@ -33,6 +33,8 @@ export class EjectorBeltSystem extends GameSystemWithFilter {
globalConfig.itemSpacingOnBelts
);
const simplifiedBelts = this.root.app.settings.getAllSettings().simplifiedBelts;
const contents = chunk.containedEntitiesByLayer.regular;
for (let i = 0; i < contents.length; ++i) {
const entity = contents[i];
@ -90,7 +92,9 @@ export class EjectorBeltSystem extends GameSystemWithFilter {
parameters.context.translate(x, y);
parameters.context.rotate(angleRadians);
this.underlayBeltSprites[animationIndex % BELT_ANIM_COUNT].drawCachedWithClipRect(
this.underlayBeltSprites[
!simplifiedBelts ? animationIndex % BELT_ANIM_COUNT : 0
].drawCachedWithClipRect(
parameters,
-globalConfig.halfTileSize,
-globalConfig.halfTileSize,