From c7c981c257101f461e2996d6809d870248610bf0 Mon Sep 17 00:00:00 2001 From: noctilucentgames Date: Tue, 27 Oct 2020 08:36:05 +0000 Subject: [PATCH] format + bug fix --- src/js/game/map_chunk.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/js/game/map_chunk.js b/src/js/game/map_chunk.js index 325a6537..03d48a29 100644 --- a/src/js/game/map_chunk.js +++ b/src/js/game/map_chunk.js @@ -195,7 +195,7 @@ export class MapChunk { if (distanceToOriginInChunks < 7) { // Initial chunks can not spawn the good stuff weights[enumSubShape.star] = 0; - weights[enumSubShape.windmill] = 0; + weights[enumSubShape.windmill] = 0; } if (distanceToOriginInChunks < 10) { @@ -213,7 +213,7 @@ export class MapChunk { this.internalGenerateRandomSubShape(rng, weights), this.internalGenerateRandomSubShape(rng, weights), this.internalGenerateRandomSubShape(rng, weights), - this.internalGenerateRandomSubShape(rng, weights) + this.internalGenerateRandomSubShape(rng, weights), ]; } @@ -238,10 +238,10 @@ export class MapChunk { } } else { // Turn subshape at 2 random positions into a random type that is not windmill - let quad1 = rng.nextIntRange(0,3); - let quad2 = rng.nextIntRange(0,2); - if (quad2 >= quad1) - { + let quad1 = rng.nextIntRange(0,4); + let quad2 = rng.nextIntRange(0,3); + if (quad2 >= quad1) + { ++quad2; } subShapes[quad1] = this.internalGenerateRandomSubShape(rng, weights);