mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-12-16 19:51:50 +00:00
Get settings to the core.
- added `allowNonPrimaryColors` to `type:GameCreationPayload` - added `allowNonPrimaryColors` to `class:InGameState`
This commit is contained in:
parent
f1fab0af96
commit
f5f790f55a
@ -51,6 +51,9 @@ export class GameCreationPayload {
|
|||||||
|
|
||||||
/** @type {number} */
|
/** @type {number} */
|
||||||
this.seed;
|
this.seed;
|
||||||
|
|
||||||
|
/** @type {boolean} */
|
||||||
|
this.allowNonPrimaryColors;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,6 +82,9 @@ export class InGameState extends GameState {
|
|||||||
/** @type {number} */
|
/** @type {number} */
|
||||||
this.seed = null;
|
this.seed = null;
|
||||||
|
|
||||||
|
/** @type {boolean} */
|
||||||
|
this.allowNonPrimaryColors = null;
|
||||||
|
|
||||||
this.boundInputFilter = this.filterInput.bind(this);
|
this.boundInputFilter = this.filterInput.bind(this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -256,7 +262,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({ seed: this.seed });
|
this.core.initNewGame({ seed: this.seed, allowNonPrimaryColors: this.allowNonPrimaryColors });
|
||||||
this.stage5FirstUpdate();
|
this.stage5FirstUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -376,6 +382,7 @@ export class InGameState extends GameState {
|
|||||||
this.savegame = payload.savegame;
|
this.savegame = payload.savegame;
|
||||||
this.gameModeId = payload.gameModeId;
|
this.gameModeId = payload.gameModeId;
|
||||||
this.seed = payload.seed;
|
this.seed = payload.seed;
|
||||||
|
this.allowNonPrimaryColors = payload.allowNonPrimaryColors;
|
||||||
|
|
||||||
this.loadingOverlay = new GameLoadingOverlay(this.app, this.getDivElement());
|
this.loadingOverlay = new GameLoadingOverlay(this.app, this.getDivElement());
|
||||||
this.loadingOverlay.showBasic();
|
this.loadingOverlay.showBasic();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user