diff --git a/src/js/changelog.js b/src/js/changelog.js index b59f4ef6..d2e99095 100644 --- a/src/js/changelog.js +++ b/src/js/changelog.js @@ -4,10 +4,12 @@ export const CHANGELOG = [ date: "preview", entries: [ "You can now hold 'ALT' while hovering a building to see its output! (Thanks to Sense101)", + "The map overview should now be much more performant! As a consequence, you can now zoom out farther! (Thanks to PFedak)", "Edit signal dialog now has the previous signal filled (Thanks to EmeraldBlock)", "Further performance improvements (Thanks to PFedak)", "Improved puzzle validation (Thanks to Sense101)", "Input fields in dialogs should now automatically focus", + "Fix selected building being deselected at level up (Thanks to EmeraldBlock)", "Updated translations", ], }, diff --git a/src/js/game/game_mode.js b/src/js/game/game_mode.js index bb60d8a6..5414306c 100644 --- a/src/js/game/game_mode.js +++ b/src/js/game/game_mode.js @@ -119,7 +119,7 @@ export class GameMode extends BasicSerializableObject { /** @returns {number} */ getMinimumZoom() { - return 0.1; + return 0.06; } /** @returns {number} */ diff --git a/src/js/game/map_chunk_aggregate.js b/src/js/game/map_chunk_aggregate.js index 67b4b45e..2c816fea 100644 --- a/src/js/game/map_chunk_aggregate.js +++ b/src/js/game/map_chunk_aggregate.js @@ -126,17 +126,25 @@ export class MapChunkAggregate { const resourcesScale = this.root.app.settings.getAllSettings().mapResourcesScale; // Draw patch items - if (this.root.currentLayer === "regular" && resourcesScale > 0.05) { + if ( + this.root.currentLayer === "regular" && + resourcesScale > 0.05 && + this.root.camera.zoomLevel > 0.1 + ) { const diameter = (70 / Math.pow(parameters.zoomLevel, 0.35)) * (0.2 + 2 * resourcesScale); for (let x = 0; x < globalConfig.chunkAggregateSize; x++) { for (let y = 0; y < globalConfig.chunkAggregateSize; y++) { this.root.map - .getChunk(this.x + x, this.y + y, true) + .getChunk( + this.x * globalConfig.chunkAggregateSize + x, + this.y * globalConfig.chunkAggregateSize + y, + true + ) .drawOverlayPatches( parameters, - this.x * dims + x * globalConfig.mapChunkSize * CHUNK_OVERLAY_RES, - this.y * dims + y * globalConfig.mapChunkSize * CHUNK_OVERLAY_RES, + this.x * dims + x * globalConfig.mapChunkWorldSize, + this.y * dims + y * globalConfig.mapChunkWorldSize, diameter ); }