Remove got to building action

This commit is contained in:
2020-04-02 11:08:32 +03:00
parent 473e3572e3
commit 23f3743599
4 changed files with 8 additions and 20 deletions

View File

@ -1,7 +1,6 @@
import Scheduler from '../Scheduler';
import GoToBuildingAction from '../Action/GoToBuildingAction';
import UpgradeBuildingAction from '../Action/UpgradeBuildingAction';
import { Command } from '../Common';
import { Args, Command } from '../Common';
import { Task } from '../Storage/TaskQueue';
import TaskController from './TaskController';
import GoToPageAction from '../Action/GoToPageAction';
@ -18,11 +17,14 @@ export default class UpgradeBuildingTask extends TaskController {
run(task: Task) {
console.log('RUN', UpgradeBuildingTask.NAME, 'with', task);
const args = { ...task.cmd.args, taskId: task.id };
const args: Args = { ...task.cmd.args, taskId: task.id };
this.scheduler.scheduleActions([
new Command(GoToPageAction.NAME, { ...args, path: '/dorf1.php' }),
new Command(CheckBuildingRemainingTimeAction.NAME, args),
new Command(GoToBuildingAction.NAME, args),
new Command(GoToPageAction.NAME, {
...args,
path: '/build.php?id=' + args.id,
}),
new Command(UpgradeBuildingAction.NAME, args),
]);
}