diff --git a/project/src/models/eft/common/tables/ILocationServices.ts b/project/src/models/eft/common/tables/ILocationServices.ts new file mode 100644 index 00000000..3cb8438b --- /dev/null +++ b/project/src/models/eft/common/tables/ILocationServices.ts @@ -0,0 +1,90 @@ +import { Ixyz } from "@spt/models/eft/common/Ixyz"; + +export interface ILocationServices +{ + TraderServerSettings: ITraderServerSettings + BTRServerSettings: IBtrServerSettings +} + +export interface ITraderServerSettings +{ + TraderServices: TraderServices +} + +export interface TraderServices +{ + ExUsecLoyalty: ITraderService + ZryachiyAid: ITraderService + CultistsAid: ITraderService + PlayerTaxi: ITraderService + BtrItemsDelivery: ITraderService + BtrBotCover: ITraderService +} + +export interface ITraderService +{ + TraderId: string + TraderServiceType: string + Requirements: IServiceRequirements + ServiceItemCost: Record + UniqueItems: string[] +} + +export interface IServiceRequirements +{ + CompletedQuests: ICompletedQuest[] + Standings: Record +} + +export interface ICompletedQuest +{ + QuestId: string +} + +export interface IStandingRequirement +{ + Value: number +} + +export interface IServiceItemCostDetails +{ + Count: number +} + +export interface IBtrServerSettings +{ + ChanceSpawn: number + SpawnPeriod: Ixyz + MoveSpeed: number + ReadyToDepartureTime: number + CheckTurnDistanceTime: number + TurnCheckSensitivity: number + DecreaseSpeedOnTurnLimit: number + EndSplineDecelerationDistance: number + AccelerationSpeed: number + DecelerationSpeed: number + PauseDurationRange: Ixyz + BodySwingReturnSpeed: number + BodySwingDamping: number + BodySwingIntensity: number + ServerMapBTRSettings: Record +} + +export interface IServerMapBtrsettings +{ + MapID: string + ChanceSpawn: number + SpawnPeriod: Ixyz + MoveSpeed: number + ReadyToDepartureTime: number + CheckTurnDistanceTime: number + TurnCheckSensitivity: number + DecreaseSpeedOnTurnLimit: number + EndSplineDecelerationDistance: number + AccelerationSpeed: number + DecelerationSpeed: number + PauseDurationRange: Ixyz + BodySwingReturnSpeed: number + BodySwingDamping: number + BodySwingIntensity: number +} diff --git a/project/src/models/eft/match/IStartLocalRaidResponseData.ts b/project/src/models/eft/match/IStartLocalRaidResponseData.ts index cea0e290..f87375a2 100644 --- a/project/src/models/eft/match/IStartLocalRaidResponseData.ts +++ b/project/src/models/eft/match/IStartLocalRaidResponseData.ts @@ -1,99 +1,16 @@ import { ILocationBase } from "@spt/models/eft/common/ILocationBase"; -import { Ixyz } from "../common/Ixyz"; +import { IInsuredItem } from "@spt/models/eft/common/tables/IBotBase"; +import { ILocationServices } from "@spt/models/eft/common/tables/ILocationServices"; export interface IStartLocalRaidResponseData { serverId: string - serverSettings: IServerSettings - profile: any + serverSettings: ILocationServices + profile: IProfileInsuredItems locationLoot: ILocationBase } -export interface IServerSettings +export interface IProfileInsuredItems { - TraderServerSettings: ITraderServerSettings - BTRServerSettings: IBtrServerSettings -} - -export interface ITraderServerSettings -{ - TraderServices: TraderServices -} - -export interface TraderServices -{ - ExUsecLoyalty: ITraderService - ZryachiyAid: ITraderService - CultistsAid: ITraderService - PlayerTaxi: ITraderService - BtrItemsDelivery: ITraderService - BtrBotCover: ITraderService -} - -export interface ITraderService -{ - TraderId: string - TraderServiceType: string - Requirements: IServiceRequirements - ServiceItemCost: Record - UniqueItems: string[] -} - -export interface IServiceRequirements -{ - CompletedQuests: ICompletedQuest[] - Standings: Record -} - -export interface ICompletedQuest -{ - QuestId: string -} - -export interface IStandingRequirement -{ - Value: number -} - -export interface IServiceItemCostDetails -{ - Count: number -} - -export interface IBtrServerSettings -{ - ChanceSpawn: number - SpawnPeriod: Ixyz - MoveSpeed: number - ReadyToDepartureTime: number - CheckTurnDistanceTime: number - TurnCheckSensitivity: number - DecreaseSpeedOnTurnLimit: number - EndSplineDecelerationDistance: number - AccelerationSpeed: number - DecelerationSpeed: number - PauseDurationRange: Ixyz - BodySwingReturnSpeed: number - BodySwingDamping: number - BodySwingIntensity: number - ServerMapBTRSettings: Record -} - -export interface IServerMapBtrsettings -{ - MapID: string - ChanceSpawn: number - SpawnPeriod: Ixyz - MoveSpeed: number - ReadyToDepartureTime: number - CheckTurnDistanceTime: number - TurnCheckSensitivity: number - DecreaseSpeedOnTurnLimit: number - EndSplineDecelerationDistance: number - AccelerationSpeed: number - DecelerationSpeed: number - PauseDurationRange: Ixyz - BodySwingReturnSpeed: number - BodySwingDamping: number - BodySwingIntensity: number + insuredItems: IInsuredItem[] } diff --git a/project/src/models/spt/templates/ITemplates.ts b/project/src/models/spt/templates/ITemplates.ts index 023f2751..f00578aa 100644 --- a/project/src/models/spt/templates/ITemplates.ts +++ b/project/src/models/spt/templates/ITemplates.ts @@ -1,6 +1,7 @@ import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; import { ICustomizationItem } from "@spt/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; +import { ILocationServices } from "@spt/models/eft/common/tables/ILocationServices"; import { IProfileTemplates } from "@spt/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt/models/eft/common/tables/IQuest"; import { IRepeatableQuestDatabase } from "@spt/models/eft/common/tables/IRepeatableQuests"; @@ -27,4 +28,7 @@ export interface ITemplates /** Achievements */ achievements: IAchievement[] + + /** Location services data */ + locationServices: ILocationServices } diff --git a/project/src/services/DatabaseService.ts b/project/src/services/DatabaseService.ts index fcaa1e8a..11b242cf 100644 --- a/project/src/services/DatabaseService.ts +++ b/project/src/services/DatabaseService.ts @@ -4,6 +4,7 @@ import { ILocation } from "@spt/models/eft/common/ILocation"; import { IAchievement } from "@spt/models/eft/common/tables/IAchievement"; import { ICustomizationItem } from "@spt/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt/models/eft/common/tables/IHandbookBase"; +import { ILocationServices } from "@spt/models/eft/common/tables/ILocationServices"; import { IMatch } from "@spt/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt/models/eft/common/tables/IQuest"; @@ -297,4 +298,17 @@ export class DatabaseService return desiredTrader!; } + + /** + * @returns assets/database/locationServices/ + */ + public getLocationServices(): ILocationServices + { + if (!this.databaseServer.getTables().templates!.locationServices) + { + throw new Error(this.localisationService.getText("database-data_at_path_missing", "assets/database/locationServices")); + } + + return this.databaseServer.getTables().templates!.locationServices!; + } }