Skip to content

Commit

Permalink
Fixed default generation seed
Browse files Browse the repository at this point in the history
  • Loading branch information
neki-dev committed Sep 13, 2023
1 parent e40e38d commit dbccf7d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gen-city",
"description": "Procedural generation city",
"version": "1.1.0",
"version": "1.1.1",
"keywords": [
"map",
"generation",
Expand Down
4 changes: 3 additions & 1 deletion src/city.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ export class City {
};

if (this.params.mode === CityGenerationMode.SEED) {
this.seed = this.params.seed ?? generateSeed();
this.seed = this.params.seed.length === 0
? generateSeed()
: this.params.seed;
}

const node = this.addNode(this.params.startPosition);
Expand Down

0 comments on commit dbccf7d

Please sign in to comment.