1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Reduce savegame size by not storing the tileSize in the static entity

This commit is contained in:
tobspr
2020-08-10 22:13:26 +02:00
parent 8d329990ef
commit bb431b8490
6 changed files with 45 additions and 66 deletions

View File

@@ -507,12 +507,7 @@ export class BeltSystem extends GameSystemWithFilter {
const direction = entity.components.Belt.direction;
const sprite = this.beltAnimations[direction][animationIndex % BELT_ANIM_COUNT];
entity.components.StaticMapEntity.drawSpriteOnFullEntityBounds(
parameters,
sprite,
0,
false
);
entity.components.StaticMapEntity.drawSpriteOnFullEntityBounds(parameters, sprite, 0);
}
}
}

View File

@@ -47,7 +47,7 @@ export class StaticMapEntitySystem extends GameSystem {
const beltComp = entity.components.Belt;
if (beltComp) {
const sprite = this.beltOverviewSprites[beltComp.direction];
staticComp.drawSpriteOnFullEntityBounds(parameters, sprite, 0, false);
staticComp.drawSpriteOnFullEntityBounds(parameters, sprite, 0);
} else {
parameters.context.fillRect(
rect.x * globalConfig.tileSize,
@@ -59,7 +59,7 @@ export class StaticMapEntitySystem extends GameSystem {
} else {
const sprite = staticComp.getSprite();
if (sprite) {
staticComp.drawSpriteOnFullEntityBounds(parameters, sprite, 2, false);
staticComp.drawSpriteOnFullEntityBounds(parameters, sprite, 2);
}
}
}
@@ -91,7 +91,7 @@ export class StaticMapEntitySystem extends GameSystem {
const sprite = staticComp.getSprite();
if (sprite) {
staticComp.drawSpriteOnFullEntityBounds(parameters, sprite, 2, false);
staticComp.drawSpriteOnFullEntityBounds(parameters, sprite, 2);
}
}
}