mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
format + bug fix
This commit is contained in:
parent
532ac0c635
commit
c7c981c257
@ -195,7 +195,7 @@ export class MapChunk {
|
|||||||
if (distanceToOriginInChunks < 7) {
|
if (distanceToOriginInChunks < 7) {
|
||||||
// Initial chunks can not spawn the good stuff
|
// Initial chunks can not spawn the good stuff
|
||||||
weights[enumSubShape.star] = 0;
|
weights[enumSubShape.star] = 0;
|
||||||
weights[enumSubShape.windmill] = 0;
|
weights[enumSubShape.windmill] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (distanceToOriginInChunks < 10) {
|
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),
|
this.internalGenerateRandomSubShape(rng, weights),
|
||||||
this.internalGenerateRandomSubShape(rng, weights)
|
this.internalGenerateRandomSubShape(rng, weights),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,10 +238,10 @@ export class MapChunk {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Turn subshape at 2 random positions into a random type that is not windmill
|
// Turn subshape at 2 random positions into a random type that is not windmill
|
||||||
let quad1 = rng.nextIntRange(0,3);
|
let quad1 = rng.nextIntRange(0,4);
|
||||||
let quad2 = rng.nextIntRange(0,2);
|
let quad2 = rng.nextIntRange(0,3);
|
||||||
if (quad2 >= quad1)
|
if (quad2 >= quad1)
|
||||||
{
|
{
|
||||||
++quad2;
|
++quad2;
|
||||||
}
|
}
|
||||||
subShapes[quad1] = this.internalGenerateRandomSubShape(rng, weights);
|
subShapes[quad1] = this.internalGenerateRandomSubShape(rng, weights);
|
||||||
|
Loading…
Reference in New Issue
Block a user