Rewrite hero resource action

try to detect hero village before balancing
This commit is contained in:
2020-04-11 13:46:10 +03:00
parent 8e8b358b91
commit 2d9c3f94e7
12 changed files with 279 additions and 76 deletions

View File

@ -3,13 +3,11 @@ import { markPage, waitForLoad } from '../utils';
import { Scheduler } from '../Scheduler';
import { TaskQueueRenderer } from '../TaskQueueRenderer';
import { BuildPage } from '../Page/BuildPage';
import {
grabActiveVillageId,
onResourceSlotCtrlClick,
showBuildingSlotIds,
showFieldsSlotIds,
} from '../Page/EveryPage';
import { UpgradeBuildingTask } from '../Task/UpgradeBuildingTask';
import { grabResources } from '../Page/ResourcesBlock';
import { grabActiveVillageId, grabVillageList } from '../Page/VillageBlock';
import { onResourceSlotCtrlClick, showBuildingSlotIds, showFieldsSlotIds } from '../Page/SlotBlock';
export class Dashboard {
private readonly version: string;
@ -30,6 +28,12 @@ export class Dashboard {
this.renderTaskQueue();
setInterval(() => this.renderTaskQueue(), 5000);
const res = grabResources();
this.log('RES', res);
const villages = grabVillageList();
this.log('VILL', villages);
const villageId = grabActiveVillageId();
const tasks = this.scheduler.getTaskItems();