break_eternity and eternal_notations. cmd line option for time
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { makeGame, ResourceGenerator, ResourceSet } from "@idle-economy/engine";
|
||||
import { makeAutoObservable } from "mobx";
|
||||
import { Notation, Presets } from 'eternal_notations';
|
||||
|
||||
export class Root {
|
||||
|
||||
@@ -8,8 +9,13 @@ export class Root {
|
||||
public resources: ResourceSet = new ResourceSet();
|
||||
public generators: ResourceGenerator[] = [];
|
||||
|
||||
public readonly availableNotationNames: string[] = Object.keys(Presets).filter((n: any) => !!(Presets as any)[n].name);
|
||||
public numberNotationName: keyof typeof Presets = 'Standard';
|
||||
public numberNotation: Notation = Presets.Standard;
|
||||
|
||||
constructor() {
|
||||
this.copyGame();
|
||||
this.setNumberNotation();
|
||||
|
||||
makeAutoObservable(this);
|
||||
}
|
||||
@@ -23,6 +29,16 @@ export class Root {
|
||||
this.resources = this.game.resources;
|
||||
this.generators = this.game.generators;
|
||||
}
|
||||
|
||||
public setNumberNotationName(value: string | keyof typeof Presets): void {
|
||||
this.numberNotationName = value as keyof typeof Presets;
|
||||
this.setNumberNotation();
|
||||
this.numberNotation.name
|
||||
}
|
||||
|
||||
private setNumberNotation() {
|
||||
this.numberNotation = Presets[this.numberNotationName] as Notation;
|
||||
}
|
||||
}
|
||||
|
||||
export const root = new Root();
|
||||
|
||||
Reference in New Issue
Block a user