2023-03-03 16:23:46 +01:00
|
|
|
import { inject, injectable } from "tsyringe";
|
|
|
|
|
2023-10-19 19:21:17 +02:00
|
|
|
import { QuestCallbacks } from "@spt-aki/callbacks/QuestCallbacks";
|
|
|
|
import { RouteAction, StaticRouter } from "@spt-aki/di/Router";
|
2023-03-03 16:23:46 +01:00
|
|
|
|
|
|
|
@injectable()
|
2023-11-13 17:12:17 +01:00
|
|
|
export class QuestStaticRouter extends StaticRouter
|
2023-03-03 16:23:46 +01:00
|
|
|
{
|
|
|
|
constructor(
|
2023-11-13 17:12:17 +01:00
|
|
|
@inject("QuestCallbacks") protected questCallbacks: QuestCallbacks,
|
|
|
|
)
|
2023-03-03 16:23:46 +01:00
|
|
|
{
|
|
|
|
super(
|
|
|
|
[
|
|
|
|
new RouteAction(
|
2023-11-13 17:12:17 +01:00
|
|
|
"/client/quest/list",
|
|
|
|
(url: string, info: any, sessionID: string, output: string): any =>
|
2023-03-03 16:23:46 +01:00
|
|
|
{
|
|
|
|
return this.questCallbacks.listQuests(url, info, sessionID);
|
2023-11-13 17:12:17 +01:00
|
|
|
},
|
|
|
|
),
|
2023-03-03 16:23:46 +01:00
|
|
|
new RouteAction(
|
2023-11-13 17:12:17 +01:00
|
|
|
"/client/repeatalbeQuests/activityPeriods",
|
|
|
|
(url: string, info: any, sessionID: string, output: string): any =>
|
2023-03-03 16:23:46 +01:00
|
|
|
{
|
|
|
|
return this.questCallbacks.activityPeriods(url, info, sessionID);
|
2023-11-13 17:12:17 +01:00
|
|
|
},
|
|
|
|
),
|
|
|
|
],
|
2023-03-03 16:23:46 +01:00
|
|
|
);
|
|
|
|
}
|
2023-11-13 17:12:17 +01:00
|
|
|
}
|