1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-16 11:41:50 +00:00

use seed from parameters in this.root.map.seed

This commit is contained in:
Daan Breur 2021-11-14 13:16:46 +01:00
parent 8c10ff8a6f
commit 6eeb82d857

View File

@ -173,7 +173,14 @@ export class GameCore {
initNewGame({ seed }) {
logger.log("Initializing new game");
this.root.gameIsFresh = true;
this.root.map.seed = randomInt(0, 100000);
if (seed === undefined) {
this.root.map.seed = randomInt(0, 100000);
} else {
this.root.map.seed = seed;
}
logger.log("this.root.map.seed: ", this.root.map.seed);
if (!this.root.gameMode.hasHub()) {
return;