break_eternity and eternal_notations. cmd line option for time

This commit is contained in:
azykov@mail.ru
2026-02-13 15:39:26 +03:00
parent 03d4948f64
commit a89f9b8141
12 changed files with 165 additions and 26 deletions
+16
View File
@@ -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();