1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2024-10-27 20:34:29 +00:00

Fixes & update changelog

This commit is contained in:
tobspr 2021-08-25 13:23:02 +02:00
parent 6f56d77535
commit 06d5c6a6dc
3 changed files with 15 additions and 5 deletions

View File

@ -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",
],
},

View File

@ -119,7 +119,7 @@ export class GameMode extends BasicSerializableObject {
/** @returns {number} */
getMinimumZoom() {
return 0.1;
return 0.06;
}
/** @returns {number} */

View File

@ -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
);
}