mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-12-16 19:51:50 +00:00
Added param1.seed to initNewGame
This commit is contained in:
parent
5a1c24c9df
commit
8c10ff8a6f
@ -166,8 +166,11 @@ export class GameCore {
|
|||||||
/**
|
/**
|
||||||
* Initializes a new game, this means creating a new map and centering on the
|
* Initializes a new game, this means creating a new map and centering on the
|
||||||
* playerbase
|
* playerbase
|
||||||
|
*
|
||||||
|
* @param {object} param1
|
||||||
|
* @param {number} param1.seed
|
||||||
* */
|
* */
|
||||||
initNewGame() {
|
initNewGame({ seed }) {
|
||||||
logger.log("Initializing new game");
|
logger.log("Initializing new game");
|
||||||
this.root.gameIsFresh = true;
|
this.root.gameIsFresh = true;
|
||||||
this.root.map.seed = randomInt(0, 100000);
|
this.root.map.seed = randomInt(0, 100000);
|
||||||
|
|||||||
@ -256,7 +256,7 @@ export class InGameState extends GameState {
|
|||||||
*/
|
*/
|
||||||
stage4aInitEmptyGame() {
|
stage4aInitEmptyGame() {
|
||||||
if (this.switchStage(stages.s4_A_initEmptyGame)) {
|
if (this.switchStage(stages.s4_A_initEmptyGame)) {
|
||||||
this.core.initNewGame();
|
this.core.initNewGame({ seed: this.seed });
|
||||||
this.stage5FirstUpdate();
|
this.stage5FirstUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user