Rewrite task queue and action queue
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
import Action from './Action';
|
||||
import { Args } from '../Common';
|
||||
import { TryLaterError } from '../Errors';
|
||||
|
||||
export default class UpgradeBuildingAction extends Action {
|
||||
static NAME = 'upgrade_building';
|
||||
|
||||
async run(args): Promise<any> {
|
||||
async run(args: Args): Promise<any> {
|
||||
const btn = jQuery(
|
||||
'.upgradeButtonsContainer .section1 button.green.build'
|
||||
);
|
||||
@ -11,6 +13,7 @@ export default class UpgradeBuildingAction extends Action {
|
||||
btn.trigger('click');
|
||||
} else {
|
||||
console.log('NO UPGRADE BUTTON');
|
||||
throw new TryLaterError(60);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user