Simplify village state manipulation

This commit is contained in:
2020-10-10 13:27:24 +03:00
parent 9bbe3ff78d
commit d03894c89d
11 changed files with 80 additions and 179 deletions

View File

@ -24,8 +24,8 @@ export class GrabberManager {
}
private createGrabbers(): Array<Grabber> {
const storage = this.factory.createStorageForActiveVillage();
const taskCollection = this.factory.createTaskCollectionForActiveVillage();
const storage = this.factory.active().storage();
const taskCollection = this.factory.active().taskCollection();
const grabbers: Array<Grabber> = [];
grabbers.push(new VillageResourceGrabber(taskCollection, storage));
grabbers.push(new VillageOverviewPageGrabber(taskCollection, storage));