Deleted unused endpoints + code

This commit is contained in:
Dev 2024-07-09 14:51:57 +01:00
parent 1c601cc33e
commit 121387aa69
6 changed files with 0 additions and 89 deletions

View File

@ -64,24 +64,6 @@ export class InraidCallbacks
return this.httpResponse.noBody(this.inraidController.getInraidConfig().raidMenuSettings);
}
/**
* Handle singleplayer/airdrop/config
* @returns JSON as string
*/
public getAirdropConfig(): string
{
return this.httpResponse.noBody(this.inraidController.getAirdropConfig());
}
/**
* Handle singleplayer/btr/config
* @returns JSON as string
*/
public getBTRConfig(): string
{
return this.httpResponse.noBody(this.inraidController.getBTRConfig());
}
public getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string
{
return this.httpResponse.noBody(this.inraidController.getTraitorScavHostileChance(url, sessionId));

View File

@ -19,9 +19,7 @@ import { PlayerRaidEndState } from "@spt/models/enums/PlayerRaidEndState";
import { QuestStatus } from "@spt/models/enums/QuestStatus";
import { SkillTypes } from "@spt/models/enums/SkillTypes";
import { Traders } from "@spt/models/enums/Traders";
import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig";
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
import { IBTRConfig } from "@spt/models/spt/config/IBTRConfig";
import { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig";
import { IInRaidConfig } from "@spt/models/spt/config/IInRaidConfig";
import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig";
@ -45,8 +43,6 @@ import { TimeUtil } from "@spt/utils/TimeUtil";
@injectable()
export class InraidController
{
protected airdropConfig: IAirdropConfig;
protected btrConfig: IBTRConfig;
protected inRaidConfig: IInRaidConfig;
protected traderConfig: ITraderConfig;
protected locationConfig: ILocationConfig;
@ -76,8 +72,6 @@ export class InraidController
@inject("RandomUtil") protected randomUtil: RandomUtil,
)
{
this.airdropConfig = this.configServer.getConfig(ConfigTypes.AIRDROP);
this.btrConfig = this.configServer.getConfig(ConfigTypes.BTR);
this.inRaidConfig = this.configServer.getConfig(ConfigTypes.IN_RAID);
this.traderConfig = this.configServer.getConfig(ConfigTypes.TRADER);
this.locationConfig = this.configServer.getConfig(ConfigTypes.LOCATION);
@ -630,24 +624,6 @@ export class InraidController
return this.inRaidConfig;
}
/**
* Get airdrop config from configs/airdrop.json
* @returns Airdrop config
*/
public getAirdropConfig(): IAirdropConfig
{
return this.airdropConfig;
}
/**
* Get BTR config from configs/btr.json
* @returns Airdrop config
*/
public getBTRConfig(): IBTRConfig
{
return this.btrConfig;
}
public getTraitorScavHostileChance(url: string, sessionID: string): number
{
return this.inRaidConfig.playerScavHostileChancePercent;

View File

@ -26,5 +26,4 @@ export enum ConfigTypes
SEASONAL_EVENT = "spt-seasonalevents",
LOST_ON_DEATH = "spt-lostondeath",
GIFTS = "spt-gifts",
BTR = "spt-btr",
}

View File

@ -5,24 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig";
export interface IAirdropConfig extends IBaseConfig
{
kind: "spt-airdrop"
airdropChancePercent: AirdropChancePercent
airdropTypeWeightings: Record<AirdropTypeEnum, number>
/** Lowest point plane will fly at */
planeMinFlyHeight: number
/** Highest point plane will fly at */
planeMaxFlyHeight: number
/** Loudness of plane engine */
planeVolume: number
/** Speed plane flies overhead */
planeSpeed: number
/** Speed loot crate falls after being dropped */
crateFallSpeed: number
/** Container tpls to use when spawning crate - affects container size, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */
containerIds: Record<string, string>
/** Earliest time aircraft will spawn in raid */
airdropMinStartTimeSeconds: number
/** Latest time aircraft will spawn in raid */
airdropMaxStartTimeSeconds: number
/** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */
loot: Record<string, AirdropLoot>
}

View File

@ -1,15 +0,0 @@
import { MinMax } from "@spt/models/common/MinMax";
import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig";
export interface IBTRConfig extends IBaseConfig
{
kind: "spt-btr"
/** How fast the BTR moves */
moveSpeed: number
/** How long the cover fire service lasts for */
coverFireTime: number
/** How long the BTR waits at every point in its path */
pointWaitTime: MinMax
/** How long after purchasing the taxi service before the BTR leaves */
taxiWaitTime: number
}

View File

@ -30,20 +30,6 @@ export class InraidStaticRouter extends StaticRouter
return this.inraidCallbacks.getRaidMenuSettings();
},
),
new RouteAction(
"/singleplayer/airdrop/config",
async (url: string, info: any, sessionID: string, output: string): Promise<string> =>
{
return this.inraidCallbacks.getAirdropConfig();
},
),
new RouteAction(
"/singleplayer/btr/config",
async (url: string, info: any, sessionID: string, output: string): Promise<string> =>
{
return this.inraidCallbacks.getBTRConfig();
},
),
new RouteAction(
"/singleplayer/scav/traitorscavhostile",
async (url: string, info: any, sessionID: string, output: string): Promise<string> =>