Remove standalone building queue info

This commit is contained in:
2020-05-27 09:57:33 +03:00
parent c1c832c21c
commit b33d84bd35
6 changed files with 1 additions and 27 deletions

View File

@ -43,12 +43,4 @@ export class ActionController {
throw new TryLaterError(aroundMinutes(1), 'Not same village');
}
}
ensureBuildingQueueIsEmpty() {
const storage = new VillageStorage(grabActiveVillageId());
const info = storage.getBuildingQueueInfo();
if (info.seconds > 0) {
throw new TryLaterError(info.seconds + 1, 'Building queue is full');
}
}
}

View File

@ -10,7 +10,6 @@ export class BuildBuildingAction extends ActionController {
async run(args: Args, task: Task): Promise<any> {
try {
this.ensureSameVillage(args, task);
this.ensureBuildingQueueIsEmpty();
const buildTypeId = args.buildTypeId || taskError('Undefined build type id');
clickBuildButton(buildTypeId);
} catch (e) {

View File

@ -10,7 +10,6 @@ export class UpgradeBuildingAction extends ActionController {
async run(args: Args, task: Task): Promise<any> {
try {
this.ensureSameVillage(args, task);
this.ensureBuildingQueueIsEmpty();
clickUpgradeButton();
} catch (e) {
if (e instanceof GrabError) {