2023-03-03 15:23:46 +00:00
|
|
|
import { inject, injectable } from "tsyringe";
|
2023-10-19 17:21:17 +00:00
|
|
|
import { LocationCallbacks } from "@spt-aki/callbacks/LocationCallbacks";
|
|
|
|
import { DynamicRouter, RouteAction } from "@spt-aki/di/Router";
|
2023-03-03 15:23:46 +00:00
|
|
|
|
|
|
|
@injectable()
|
2023-11-15 20:35:05 -05:00
|
|
|
export class LocationDynamicRouter extends DynamicRouter
|
2023-03-03 15:23:46 +00:00
|
|
|
{
|
2023-11-15 20:35:05 -05:00
|
|
|
constructor(@inject("LocationCallbacks") protected locationCallbacks: LocationCallbacks)
|
2023-03-03 15:23:46 +00:00
|
|
|
{
|
2023-11-15 20:35:05 -05:00
|
|
|
super([
|
|
|
|
new RouteAction(
|
|
|
|
"/client/location/getLocalloot",
|
|
|
|
(url: string, info: any, sessionID: string, _output: string): any =>
|
|
|
|
{
|
|
|
|
return this.locationCallbacks.getLocation(url, info, sessionID);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
]);
|
2023-03-03 15:23:46 +00:00
|
|
|
}
|
|
|
|
|
2023-11-15 20:35:05 -05:00
|
|
|
public override getTopLevelRoute(): string
|
2023-03-03 15:23:46 +00:00
|
|
|
{
|
|
|
|
return "aki-loot";
|
|
|
|
}
|
2023-11-15 20:35:05 -05:00
|
|
|
}
|