Skip to content

Commit

Permalink
Merge pull request #2 from stayintarkov/bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
trippyone authored Nov 24, 2023
2 parents 4d7595c + 5431d9b commit bee7001
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/StayInTarkovMod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import { CoopMatchResponse } from "./CoopMatchResponse";
import { friendlyAI } from "./FriendlyAI";
import { SITCustomTraders } from "./Traders/SITCustomTraders";
import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper";
import { BundleCallbacks } from "@spt-aki/callbacks/BundleCallbacks";
// -------------------------------------------------------------------------


Expand All @@ -70,6 +71,7 @@ export class StayInTarkovMod implements IPreAkiLoadMod, IPostDBLoadMod
resolvedExternalIP: string;
profileHelper: ProfileHelper;
httpServerHelper: HttpServerHelper;
bundleCallbacks: BundleCallbacks;

public traders: any[] = [];

Expand Down Expand Up @@ -114,6 +116,7 @@ export class StayInTarkovMod implements IPreAkiLoadMod, IPostDBLoadMod
this.bundleLoader = container.resolve<BundleLoader>("BundleLoader");
this.profileHelper = container.resolve<ProfileHelper>("ProfileHelper");
this.httpServerHelper = container.resolve<HttpServerHelper>("HttpServerHelper");
this.bundleCallbacks = container.resolve<BundleCallbacks>("BundleCallbacks");

// this.traders.push(new SITCustomTraders(), new CoopGroupTrader(), new UsecTrader(), new BearTrader());
this.traders.push(new SITCustomTraders());
Expand Down Expand Up @@ -200,6 +203,14 @@ export class StayInTarkovMod implements IPreAkiLoadMod, IPostDBLoadMod
output = JSON.stringify(friendlyAI);
return output;
}
),
new RouteAction(
"/files/bundle",
// eslint-disable-next-line @typescript-eslint/no-unused-vars
(url: string, info: any, sessionID: string, output: string): any =>
{
return this.bundleCallbacks.getBundle(url, info, sessionID);
}
)
]
,"aki"
Expand Down

0 comments on commit bee7001

Please sign in to comment.