mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 07:10:44 -05:00
Stub out various endpoints
This commit is contained in:
parent
40b999d04c
commit
b70ef6df39
@ -36,6 +36,12 @@
|
||||
"crazyAssaultEvent": 15,
|
||||
"bossBoar": 5,
|
||||
"bossBoarSniper": 5,
|
||||
"followerBoarClose1": 10,
|
||||
"followerBoarClose2": 10,
|
||||
"bossKolontay": 5,
|
||||
"followerKolontayAssault": 10,
|
||||
"followerKolontaySecurity": 10,
|
||||
"shooterBTR": 10,
|
||||
"sptUsec": 30,
|
||||
"sptBear": 30
|
||||
},
|
||||
@ -588,6 +594,30 @@
|
||||
"lightLaserLimit": 1
|
||||
}
|
||||
},
|
||||
"followerboarclose1": {
|
||||
"nvgIsActiveChanceDayPercent": 20,
|
||||
"nvgIsActiveChanceNightPercent": 85,
|
||||
"faceShieldIsActiveChancePercent": 80,
|
||||
"lightIsActiveDayChancePercent": 25,
|
||||
"lightIsActiveNightChancePercent": 75,
|
||||
"laserIsActiveChancePercent": 75,
|
||||
"weaponModLimits": {
|
||||
"scopeLimit": 2,
|
||||
"lightLaserLimit": 1
|
||||
}
|
||||
},
|
||||
"followerboarclose2": {
|
||||
"nvgIsActiveChanceDayPercent": 20,
|
||||
"nvgIsActiveChanceNightPercent": 85,
|
||||
"faceShieldIsActiveChancePercent": 80,
|
||||
"lightIsActiveDayChancePercent": 25,
|
||||
"lightIsActiveNightChancePercent": 75,
|
||||
"laserIsActiveChancePercent": 75,
|
||||
"weaponModLimits": {
|
||||
"scopeLimit": 2,
|
||||
"lightLaserLimit": 1
|
||||
}
|
||||
},
|
||||
"bossboarsniper": {
|
||||
"nvgIsActiveChanceDayPercent": 20,
|
||||
"nvgIsActiveChanceNightPercent": 85,
|
||||
@ -601,6 +631,19 @@
|
||||
"lightLaserLimit": 1
|
||||
}
|
||||
},
|
||||
"bosskolontay": {
|
||||
"nvgIsActiveChanceDayPercent": 20,
|
||||
"nvgIsActiveChanceNightPercent": 85,
|
||||
"faceShieldIsActiveChancePercent": 80,
|
||||
"lightIsActiveDayChancePercent": 25,
|
||||
"lightIsActiveNightChancePercent": 75,
|
||||
"laserIsActiveChancePercent": 75,
|
||||
"forceStock": true,
|
||||
"weaponModLimits": {
|
||||
"scopeLimit": 2,
|
||||
"lightLaserLimit": 1
|
||||
}
|
||||
},
|
||||
"followertest": {},
|
||||
"sectantpriest": {
|
||||
"nvgIsActiveChanceDayPercent": 10,
|
||||
|
34
project/src/callbacks/AchievementCallbacks.ts
Normal file
34
project/src/callbacks/AchievementCallbacks.ts
Normal file
@ -0,0 +1,34 @@
|
||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||
import { inject, injectable } from "tsyringe";
|
||||
|
||||
@injectable()
|
||||
export class AchievementCallbacks
|
||||
{
|
||||
constructor(
|
||||
// @inject("AchievementController") protected botController: AchievementController,
|
||||
@inject("HttpResponseUtil") protected httpResponse: HttpResponseUtil,
|
||||
)
|
||||
{}
|
||||
|
||||
/**
|
||||
* Handle client/achievement/list
|
||||
*
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
public getAchievements(url: string, info: IEmptyRequestData, sessionID: string): any
|
||||
{
|
||||
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle client/achievement/statistic
|
||||
*
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
public statistic(url: string, info: IEmptyRequestData, sessionID: string): any
|
||||
{
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
}
|
63
project/src/callbacks/BuildsCallbacks.ts
Normal file
63
project/src/callbacks/BuildsCallbacks.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||
import { inject, injectable } from "tsyringe";
|
||||
|
||||
@injectable()
|
||||
export class BuildsCallbacks
|
||||
{
|
||||
constructor(
|
||||
// @inject("AchievementController") protected botController: AchievementController,
|
||||
@inject("HttpResponseUtil") protected httpResponse: HttpResponseUtil,
|
||||
)
|
||||
{}
|
||||
|
||||
/**
|
||||
* Handle client/builds/list
|
||||
*
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
public getBuilds(url: string, info: IEmptyRequestData, sessionID: string): any
|
||||
{
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle client/builds/magazine/save
|
||||
*
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
public setMagazine(url: string, info: IEmptyRequestData, sessionID: string): any
|
||||
{
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle client/builds/weapon/save
|
||||
*
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
public setWeapon(url: string, info: IEmptyRequestData, sessionID: string): any
|
||||
{
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle client/builds/equipment/save
|
||||
*
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
public setEquipment(url: string, info: IEmptyRequestData, sessionID: string): any
|
||||
{
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle client/builds/delete
|
||||
*
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
public deleteBuild(url: string, info: IEmptyRequestData, sessionID: string): any
|
||||
{
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
}
|
@ -211,4 +211,14 @@ export class MatchCallbacks
|
||||
this.matchController.startOfflineRaid(info, sessionID);
|
||||
return this.httpResponse.nullResponse();
|
||||
}
|
||||
|
||||
/** Handle client/raid/configuration-by-profile */
|
||||
public getConfigurationByProfile(
|
||||
url: string,
|
||||
info: IGetRaidConfigurationRequestData,
|
||||
sessionID: string,
|
||||
): INullResponseData
|
||||
{
|
||||
return this.httpResponse.nullResponse();
|
||||
}
|
||||
}
|
||||
|
@ -159,6 +159,19 @@ export class ProfileCallbacks
|
||||
return this.httpResponse.getBody(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle client/profile/view
|
||||
* Called when viewing another players profile
|
||||
*/
|
||||
public getOtherProfile(
|
||||
url: string,
|
||||
info: IEmptyRequestData,
|
||||
sessionID: string,
|
||||
): any
|
||||
{
|
||||
throw new Error("Not implemented");
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle client/profile/settings
|
||||
*/
|
||||
|
@ -161,7 +161,9 @@ import { ProfileSaveLoadRouter } from "@spt-aki/routers/save_load/ProfileSaveLoa
|
||||
import { BundleSerializer } from "@spt-aki/routers/serializers/BundleSerializer";
|
||||
import { ImageSerializer } from "@spt-aki/routers/serializers/ImageSerializer";
|
||||
import { NotifySerializer } from "@spt-aki/routers/serializers/NotifySerializer";
|
||||
import { AchievementStaticRouter } from "@spt-aki/routers/static/AchievementStaticRouter";
|
||||
import { BotStaticRouter } from "@spt-aki/routers/static/BotStaticRouter";
|
||||
import { BuildsStaticRouter } from "@spt-aki/routers/static/BuildStaticRouter";
|
||||
import { BundleStaticRouter } from "@spt-aki/routers/static/BundleStaticRouter";
|
||||
import { ClientLogStaticRouter } from "@spt-aki/routers/static/ClientLogStaticRouter";
|
||||
import { CustomizationStaticRouter } from "@spt-aki/routers/static/CustomizationStaticRouter";
|
||||
@ -328,6 +330,8 @@ export class Container
|
||||
depContainer.registerType("StaticRoutes", "RagfairStaticRouter");
|
||||
depContainer.registerType("StaticRoutes", "PresetStaticRouter");
|
||||
depContainer.registerType("StaticRoutes", "BundleStaticRouter");
|
||||
depContainer.registerType("StaticRoutes", "AchievementStaticRouter");
|
||||
depContainer.registerType("StaticRoutes", "BuildsStaticRouter");
|
||||
depContainer.registerType("StaticRoutes", "NotifierStaticRouter");
|
||||
depContainer.registerType("StaticRoutes", "ProfileStaticRouter");
|
||||
depContainer.registerType("StaticRoutes", "TraderStaticRouter");
|
||||
@ -489,6 +493,8 @@ export class Container
|
||||
depContainer.register<RagfairStaticRouter>("RagfairStaticRouter", { useClass: RagfairStaticRouter });
|
||||
depContainer.register<TraderStaticRouter>("TraderStaticRouter", { useClass: TraderStaticRouter });
|
||||
depContainer.register<WeatherStaticRouter>("WeatherStaticRouter", { useClass: WeatherStaticRouter });
|
||||
depContainer.register<AchievementStaticRouter>("AchievementStaticRouter", { useClass: AchievementStaticRouter });
|
||||
depContainer.register<BuildsStaticRouter>("BuildsStaticRouter", { useClass: BuildsStaticRouter });
|
||||
}
|
||||
|
||||
private static registerGenerators(depContainer: DependencyContainer): void
|
||||
|
31
project/src/routers/static/AchievementStaticRouter.ts
Normal file
31
project/src/routers/static/AchievementStaticRouter.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import { inject, injectable } from "tsyringe";
|
||||
|
||||
import { AchievementCallbacks } from "@spt-aki/callbacks/AchievementCallbacks";
|
||||
import { RouteAction, StaticRouter } from "@spt-aki/di/Router";
|
||||
|
||||
@injectable()
|
||||
export class AchievementStaticRouter extends StaticRouter
|
||||
{
|
||||
constructor(@inject("AchievementStaticRouter") protected achievementCallbacks: AchievementCallbacks)
|
||||
{
|
||||
super([
|
||||
new RouteAction(
|
||||
"/client/achievement/list",
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
(url: string, info: any, sessionID: string, output: string): any =>
|
||||
{
|
||||
return this.achievementCallbacks.getAchievements(url, info, sessionID);
|
||||
},
|
||||
),
|
||||
|
||||
new RouteAction(
|
||||
"/client/achievement/statistic",
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
(url: string, info: any, sessionID: string, output: string): any =>
|
||||
{
|
||||
return this.achievementCallbacks.statistic(url, info, sessionID);
|
||||
},
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
54
project/src/routers/static/BuildStaticRouter.ts
Normal file
54
project/src/routers/static/BuildStaticRouter.ts
Normal file
@ -0,0 +1,54 @@
|
||||
import { inject, injectable } from "tsyringe";
|
||||
|
||||
import { BuildsCallbacks } from "@spt-aki/callbacks/BuildsCallbacks";
|
||||
import { RouteAction, StaticRouter } from "@spt-aki/di/Router";
|
||||
|
||||
@injectable()
|
||||
export class BuildsStaticRouter extends StaticRouter
|
||||
{
|
||||
constructor(@inject("BuildsCallbacks") protected buildsCallbacks: BuildsCallbacks)
|
||||
{
|
||||
super([
|
||||
new RouteAction(
|
||||
"/client/builds/list",
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
(url: string, info: any, sessionID: string, output: string): any =>
|
||||
{
|
||||
return this.buildsCallbacks.getBuilds(url, info, sessionID);
|
||||
},
|
||||
),
|
||||
new RouteAction(
|
||||
"/client/builds/magazine/save",
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
(url: string, info: any, sessionID: string, output: string): any =>
|
||||
{
|
||||
return this.buildsCallbacks.setMagazine(url, info, sessionID);
|
||||
},
|
||||
),
|
||||
new RouteAction(
|
||||
"/client/builds/weapon/save",
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
(url: string, info: any, sessionID: string, output: string): any =>
|
||||
{
|
||||
return this.buildsCallbacks.setWeapon(url, info, sessionID);
|
||||
},
|
||||
),
|
||||
new RouteAction(
|
||||
"/client/builds/equipment/save",
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
(url: string, info: any, sessionID: string, output: string): any =>
|
||||
{
|
||||
return this.buildsCallbacks.setEquipment(url, info, sessionID);
|
||||
},
|
||||
),
|
||||
new RouteAction(
|
||||
"/client/builds/delete",
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
(url: string, info: any, sessionID: string, output: string): any =>
|
||||
{
|
||||
return this.buildsCallbacks.deleteBuild(url, info, sessionID);
|
||||
},
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
@ -185,6 +185,14 @@ export class MatchStaticRouter extends StaticRouter
|
||||
return this.matchCallbacks.getRaidConfiguration(url, info, sessionID);
|
||||
},
|
||||
),
|
||||
new RouteAction(
|
||||
"/client/raid/configuration-by-profile",
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
(url: string, info: any, sessionID: string, output: string): any =>
|
||||
{
|
||||
return this.matchCallbacks.getConfigurationByProfile(url, info, sessionID);
|
||||
},
|
||||
),
|
||||
new RouteAction(
|
||||
"/client/match/group/player/remove",
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
|
@ -73,6 +73,14 @@ export class ProfileStaticRouter extends StaticRouter
|
||||
return this.profileCallbacks.getProfileStatus(url, info, sessionID);
|
||||
},
|
||||
),
|
||||
new RouteAction(
|
||||
"/client/profile/view",
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
(url: string, info: any, sessionID: string, output: string): any =>
|
||||
{
|
||||
return this.profileCallbacks.getOtherProfile(url, info, sessionID);
|
||||
},
|
||||
),
|
||||
new RouteAction(
|
||||
"/client/profile/settings",
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
|
Loading…
x
Reference in New Issue
Block a user