full generation and upgrade rules revamp

This commit is contained in:
azykov@mail.ru
2026-02-14 13:37:17 +03:00
parent c9c9f03526
commit 52f75c74c0
19 changed files with 374 additions and 204 deletions
+7
View File
@@ -1,6 +1,7 @@
import { makeGame, ResourceGenerator, ResourceSet } from "@idle-economy/engine";
import { makeAutoObservable } from "mobx";
import { Notation, Presets } from 'eternal_notations';
import { now } from "../tools/time";
export class Root {
@@ -9,6 +10,8 @@ export class Root {
public resources: ResourceSet = new ResourceSet();
public generators: ResourceGenerator[] = [];
public lastGameTime = now();
public readonly availableNotationNames: string[] = Object.keys(Presets).filter((n: any) => !!(Presets as any)[n].name).sort();
public numberNotationName: keyof typeof Presets = 'Standard';
public numberNotation: Notation = Presets.Standard;
@@ -19,6 +22,10 @@ export class Root {
makeAutoObservable(this);
}
public setLastGameTime(value: number) {
this.lastGameTime = value;
}
public tick(deltaTime: number): void {
Array.from(this.game.tick(deltaTime));