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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user