Deleted unused endpoints + code
This commit is contained in:
parent
1c601cc33e
commit
121387aa69
@ -64,24 +64,6 @@ export class InraidCallbacks
|
|||||||
return this.httpResponse.noBody(this.inraidController.getInraidConfig().raidMenuSettings);
|
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
|
public getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string
|
||||||
{
|
{
|
||||||
return this.httpResponse.noBody(this.inraidController.getTraitorScavHostileChance(url, sessionId));
|
return this.httpResponse.noBody(this.inraidController.getTraitorScavHostileChance(url, sessionId));
|
||||||
|
@ -19,9 +19,7 @@ import { PlayerRaidEndState } from "@spt/models/enums/PlayerRaidEndState";
|
|||||||
import { QuestStatus } from "@spt/models/enums/QuestStatus";
|
import { QuestStatus } from "@spt/models/enums/QuestStatus";
|
||||||
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
||||||
import { Traders } from "@spt/models/enums/Traders";
|
import { Traders } from "@spt/models/enums/Traders";
|
||||||
import { IAirdropConfig } from "@spt/models/spt/config/IAirdropConfig";
|
|
||||||
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
|
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 { IHideoutConfig } from "@spt/models/spt/config/IHideoutConfig";
|
||||||
import { IInRaidConfig } from "@spt/models/spt/config/IInRaidConfig";
|
import { IInRaidConfig } from "@spt/models/spt/config/IInRaidConfig";
|
||||||
import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "@spt/models/spt/config/ILocationConfig";
|
||||||
@ -45,8 +43,6 @@ import { TimeUtil } from "@spt/utils/TimeUtil";
|
|||||||
@injectable()
|
@injectable()
|
||||||
export class InraidController
|
export class InraidController
|
||||||
{
|
{
|
||||||
protected airdropConfig: IAirdropConfig;
|
|
||||||
protected btrConfig: IBTRConfig;
|
|
||||||
protected inRaidConfig: IInRaidConfig;
|
protected inRaidConfig: IInRaidConfig;
|
||||||
protected traderConfig: ITraderConfig;
|
protected traderConfig: ITraderConfig;
|
||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
@ -76,8 +72,6 @@ export class InraidController
|
|||||||
@inject("RandomUtil") protected randomUtil: RandomUtil,
|
@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.inRaidConfig = this.configServer.getConfig(ConfigTypes.IN_RAID);
|
||||||
this.traderConfig = this.configServer.getConfig(ConfigTypes.TRADER);
|
this.traderConfig = this.configServer.getConfig(ConfigTypes.TRADER);
|
||||||
this.locationConfig = this.configServer.getConfig(ConfigTypes.LOCATION);
|
this.locationConfig = this.configServer.getConfig(ConfigTypes.LOCATION);
|
||||||
@ -630,24 +624,6 @@ export class InraidController
|
|||||||
return this.inRaidConfig;
|
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
|
public getTraitorScavHostileChance(url: string, sessionID: string): number
|
||||||
{
|
{
|
||||||
return this.inRaidConfig.playerScavHostileChancePercent;
|
return this.inRaidConfig.playerScavHostileChancePercent;
|
||||||
|
@ -26,5 +26,4 @@ export enum ConfigTypes
|
|||||||
SEASONAL_EVENT = "spt-seasonalevents",
|
SEASONAL_EVENT = "spt-seasonalevents",
|
||||||
LOST_ON_DEATH = "spt-lostondeath",
|
LOST_ON_DEATH = "spt-lostondeath",
|
||||||
GIFTS = "spt-gifts",
|
GIFTS = "spt-gifts",
|
||||||
BTR = "spt-btr",
|
|
||||||
}
|
}
|
||||||
|
@ -5,24 +5,7 @@ import { IBaseConfig } from "@spt/models/spt/config/IBaseConfig";
|
|||||||
export interface IAirdropConfig extends IBaseConfig
|
export interface IAirdropConfig extends IBaseConfig
|
||||||
{
|
{
|
||||||
kind: "spt-airdrop"
|
kind: "spt-airdrop"
|
||||||
airdropChancePercent: AirdropChancePercent
|
|
||||||
airdropTypeWeightings: Record<AirdropTypeEnum, number>
|
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 */
|
/** What rewards will the loot crate contain, keyed by drop type e.g. mixed/weaponArmor/foodMedical/barter */
|
||||||
loot: Record<string, AirdropLoot>
|
loot: Record<string, AirdropLoot>
|
||||||
}
|
}
|
||||||
|
@ -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
|
|
||||||
}
|
|
@ -30,20 +30,6 @@ export class InraidStaticRouter extends StaticRouter
|
|||||||
return this.inraidCallbacks.getRaidMenuSettings();
|
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(
|
new RouteAction(
|
||||||
"/singleplayer/scav/traitorscavhostile",
|
"/singleplayer/scav/traitorscavhostile",
|
||||||
async (url: string, info: any, sessionID: string, output: string): Promise<string> =>
|
async (url: string, info: any, sessionID: string, output: string): Promise<string> =>
|
||||||
|
Loading…
Reference in New Issue
Block a user