diff --git a/project/src/callbacks/MatchCallbacks.ts b/project/src/callbacks/MatchCallbacks.ts index 5bedd35f..81537a76 100644 --- a/project/src/callbacks/MatchCallbacks.ts +++ b/project/src/callbacks/MatchCallbacks.ts @@ -3,21 +3,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IGroupCurrentResponse } from "@spt-aki/models/eft/match/IGroupCurrentResponse"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -59,7 +57,7 @@ export class MatchCallbacks url: string, info: IEmptyRequestData, sessionID: string, - ): IGetBodyResponseData + ): IGetBodyResponseData { throw new Error("Method not implemented."); } @@ -78,7 +76,11 @@ export class MatchCallbacks /** Handle client/match/group/invite/send */ // eslint-disable-next-line @typescript-eslint/no-unused-vars - public sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData + public sendGroupInvite( + url: string, + info: IMatchGroupInviteSendRequest, + sessionID: string, + ): IGetBodyResponseData { return this.httpResponse.getBody("2427943f23698ay9f2863735"); } @@ -87,9 +89,9 @@ export class MatchCallbacks // eslint-disable-next-line @typescript-eslint/no-unused-vars public acceptGroupInvite( url: string, - info: IAcceptGroupInviteRequest, + info: IRequestIdRequest, sessionId: string, - ): IGetBodyResponseData + ): IGetBodyResponseData { const result = []; result.push({}); @@ -101,7 +103,7 @@ export class MatchCallbacks // eslint-disable-next-line @typescript-eslint/no-unused-vars public declineGroupInvite( url: string, - info: IDeclineGroupInviteRequest, + info: IRequestIdRequest, sessionId: string, ): IGetBodyResponseData { @@ -112,7 +114,7 @@ export class MatchCallbacks // eslint-disable-next-line @typescript-eslint/no-unused-vars public cancelGroupInvite( url: string, - info: ICancelGroupInviteRequest, + info: IRequestIdRequest, sessionID: string, ): IGetBodyResponseData { @@ -123,7 +125,7 @@ export class MatchCallbacks // eslint-disable-next-line @typescript-eslint/no-unused-vars public transferGroup( url: string, - info: ITransferGroupRequest, + info: IMatchGroupTransferRequest, sessionId: string, ): IGetBodyResponseData { @@ -160,9 +162,9 @@ export class MatchCallbacks /** Handle match/group/start_game */ public joinMatch( url: string, - info: IJoinMatchRequestData, + info: IMatchGroupStartGameRequest, sessionID: string, - ): IGetBodyResponseData + ): IGetBodyResponseData { return this.httpResponse.getBody(this.matchController.joinMatch(info, sessionID)); } @@ -182,16 +184,16 @@ export class MatchCallbacks // eslint-disable-next-line @typescript-eslint/no-unused-vars public getGroupStatus( url: string, - info: IGetGroupStatusRequestData, + info: IMatchGroupStatusRequest, sessionID: string, - ): IGetBodyResponseData + ): IGetBodyResponseData { return this.httpResponse.getBody(this.matchController.getGroupStatus(info)); } /** Handle client/match/group/delete */ // eslint-disable-next-line @typescript-eslint/no-unused-vars - public deleteGroup(url: string, info: any, sessionID: string): IGetBodyResponseData + public deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData { this.matchController.deleteGroup(info); return this.httpResponse.getBody(true); @@ -208,7 +210,7 @@ export class MatchCallbacks // eslint-disable-next-line @typescript-eslint/no-unused-vars public removePlayerFromGroup( url: string, - info: IRemovePlayerFromGroupRequest, + info: IMatchGroupPlayerRemoveRequest, sessionID: string, ): IGetBodyResponseData { diff --git a/project/src/controllers/MatchController.ts b/project/src/controllers/MatchController.ts index de2b8caa..23dd7b78 100644 --- a/project/src/controllers/MatchController.ts +++ b/project/src/controllers/MatchController.ts @@ -7,11 +7,11 @@ import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { Traders } from "@spt-aki/models/enums/Traders"; @@ -76,9 +76,9 @@ export class MatchController /** Handle match/group/start_game */ // eslint-disable-next-line @typescript-eslint/no-unused-vars - public joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult + public joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse { - const output: IJoinMatchResult = { maxPveCountExceeded: false, profiles: [] }; + const output: IProfileStatusResponse = { maxPveCountExceeded: false, profiles: [] }; // get list of players joining into the match output.profiles.push({ @@ -92,7 +92,7 @@ export class MatchController location: "TODO get location", raidMode: "Online", mode: "deathmatch", - shortid: null, + shortId: null, // eslint-disable-next-line @typescript-eslint/naming-convention additional_info: null, }); @@ -102,7 +102,7 @@ export class MatchController /** Handle client/match/group/status */ // eslint-disable-next-line @typescript-eslint/no-unused-vars - public getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse + public getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse { return { players: [], maxPveCountExceeded: false }; } diff --git a/project/src/models/eft/match/IAcceptGroupInviteRequest.ts b/project/src/models/eft/match/IAcceptGroupInviteRequest.ts deleted file mode 100644 index 63f2aadb..00000000 --- a/project/src/models/eft/match/IAcceptGroupInviteRequest.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IAcceptGroupInviteRequest -{ - requestId: string -} diff --git a/project/src/models/eft/match/IAcceptGroupInviteResponse.ts b/project/src/models/eft/match/IAcceptGroupInviteResponse.ts deleted file mode 100644 index cf650480..00000000 --- a/project/src/models/eft/match/IAcceptGroupInviteResponse.ts +++ /dev/null @@ -1,19 +0,0 @@ -export interface IAcceptGroupInviteResponse -{ - _id: string - aid: number - Info: PlayerInviteInfo - isLeader: boolean - isReady: boolean -} - -export interface PlayerInviteInfo -{ - Nickname: string - Side: string - Level: number - MemberCategory: number - GameVersion: string - SavageLockTime: number - SavageNickname: string -} diff --git a/project/src/models/eft/match/ICancelGroupInviteRequest.ts b/project/src/models/eft/match/ICancelGroupInviteRequest.ts deleted file mode 100644 index 253d4a94..00000000 --- a/project/src/models/eft/match/ICancelGroupInviteRequest.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ICancelGroupInviteRequest -{ - requestId: string -} diff --git a/project/src/models/eft/match/ICreateGroupRequestData.ts b/project/src/models/eft/match/ICreateGroupRequestData.ts deleted file mode 100644 index e742335f..00000000 --- a/project/src/models/eft/match/ICreateGroupRequestData.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; - -export interface ICreateGroupRequestData -{ - location: string - raidMode: RaidMode - startInGroup: boolean -} diff --git a/project/src/models/eft/match/IDeclineGroupInviteRequest.ts b/project/src/models/eft/match/IDeclineGroupInviteRequest.ts deleted file mode 100644 index 718641e0..00000000 --- a/project/src/models/eft/match/IDeclineGroupInviteRequest.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IDeclineGroupInviteRequest -{ - requestId: string; -} diff --git a/project/src/models/eft/match/IGetGroupStatusResponse.ts b/project/src/models/eft/match/IGetGroupStatusResponse.ts deleted file mode 100644 index fed1ccdc..00000000 --- a/project/src/models/eft/match/IGetGroupStatusResponse.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; - -export interface IGetGroupStatusResponse -{ - players: IPlayer[] - maxPveCountExceeded: boolean -} - -export interface IPlayer -{ - aid: string - _id: string - lookingGroup: boolean - IsLeader: boolean - IsReady: boolean - Info: ICurrentGroupMemberInfo -} - -export interface ICurrentGroupMemberInfo -{ - Nickname: string - Side: string - Level: string - MemberCategory: MemberCategory -} diff --git a/project/src/models/eft/match/IGetProfileRequestData.ts b/project/src/models/eft/match/IGetProfileRequestData.ts deleted file mode 100644 index 6be9dc34..00000000 --- a/project/src/models/eft/match/IGetProfileRequestData.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IGetProfileRequestData -{ - profileId: string -} diff --git a/project/src/models/eft/match/IGetRaidConfigurationRequestData.ts b/project/src/models/eft/match/IGetRaidConfigurationRequestData.ts index 2548f84e..947762dd 100644 --- a/project/src/models/eft/match/IGetRaidConfigurationRequestData.ts +++ b/project/src/models/eft/match/IGetRaidConfigurationRequestData.ts @@ -1,71 +1,8 @@ -export interface IGetRaidConfigurationRequestData +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; + +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string - side: string - location: string - timeVariant: string - raidMode: string - metabolismDisabled: boolean - playersSpawnPlace: string - timeAndWeatherSettings: TimeAndWeatherSettings - botSettings: BotSettings - wavesSettings: WavesSettings CanShowGroupPreview: boolean MaxGroupCount: number } - -// { -// keyId: "", -// side: "Pmc", -// location: "factory4_day", -// timeVariant: "CURR", or "PAST" -// raidMode: "Local", -// metabolismDisabled: false, -// playersSpawnPlace: "SamePlace", -// timeAndWeatherSettings: { -// isRandomTime: false, -// isRandomWeather: false, -// cloudinessType: "Clear", -// rainType: "NoRain", -// windType: "Light", -// fogType: "NoFog", -// timeFlowType: "x1", -// hourOfDay: -1 -// }, -// botSettings: { -// isScavWars: false, -// botAmount: "AsOnline" -// }, -// wavesSettings: { -// botAmount: "AsOnline", -// botDifficulty: "AsOnline", -// isBosses: true, -// isTaggedAndCursed: false -// } -// } - -export interface TimeAndWeatherSettings -{ - isRandomTime: boolean - isRandomWeather: boolean - cloudinessType: string - rainType: string - windType: string - fogType: string - timeFlowType: string - hourOfDay: number -} - -export interface BotSettings -{ - isScavWars: boolean - botAmount: string -} - -export interface WavesSettings -{ - botAmount: string - botDifficulty: string - isBosses: boolean - isTaggedAndCursed: boolean -} diff --git a/project/src/models/eft/match/IGroupCharacter.ts b/project/src/models/eft/match/IGroupCharacter.ts new file mode 100644 index 00000000..98c61d1e --- /dev/null +++ b/project/src/models/eft/match/IGroupCharacter.ts @@ -0,0 +1,41 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; + +export interface IGroupCharacter +{ + _id: string + aid: number + Info: { + Nickname: string + Side: string + Level: number + MemberCategory: MemberCategory + GameVersion?: string + SavageLockTime?: number + SavageNickname?: string + hasCoopExtension?: boolean + } + PlayerVisualRepresentation?: { + Info: { + Side: string + Level: number + Nickname: string + MemberCategory: MemberCategory + GameVersion: string + } + Customization: { + Head: string + Body: string + Feet: string + Hands: string + } + Equipment: { + Id: string + Items: Item[] + } + } + isLeader: boolean + isReady?: boolean + region?: string + lookingGroup?: boolean +} diff --git a/project/src/models/eft/match/IGroupCurrentResponse.ts b/project/src/models/eft/match/IGroupCurrentResponse.ts deleted file mode 100644 index 266ac492..00000000 --- a/project/src/models/eft/match/IGroupCurrentResponse.ts +++ /dev/null @@ -1,13 +0,0 @@ -export interface IGroupCurrentResponse -{ - squad: ISquadMember[] -} - -export interface ISquadMember -{ - _id: string - aid: number - Info: any - isLeader: boolean - isReady: boolean -} diff --git a/project/src/models/eft/match/IJoinMatchRequestData.ts b/project/src/models/eft/match/IJoinMatchRequestData.ts deleted file mode 100644 index d06fb6ce..00000000 --- a/project/src/models/eft/match/IJoinMatchRequestData.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface IJoinMatchRequestData -{ - groupId: string - servers: Server[] -} - -export interface Server -{ - ping: number - ip: string - port: string -} diff --git a/project/src/models/eft/match/IJoinMatchResult.ts b/project/src/models/eft/match/IJoinMatchResult.ts deleted file mode 100644 index da9f4025..00000000 --- a/project/src/models/eft/match/IJoinMatchResult.ts +++ /dev/null @@ -1,21 +0,0 @@ -export interface IJoinMatchResult -{ - maxPveCountExceeded: boolean - profiles: IJoinMatchPlayerProfile[] -} - -export interface IJoinMatchPlayerProfile -{ - profileid: string - profileToken: string - status: string - sid: string - ip: string - port: number - version: string - location: string - raidMode: string - mode: string - shortid: string - additional_info: any[] -} diff --git a/project/src/models/eft/match/IMatchGroupCurrentResponse.ts b/project/src/models/eft/match/IMatchGroupCurrentResponse.ts new file mode 100644 index 00000000..7f504cbc --- /dev/null +++ b/project/src/models/eft/match/IMatchGroupCurrentResponse.ts @@ -0,0 +1,6 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; + +export interface IMatchGroupCurrentResponse +{ + squad: IGroupCharacter[] +} diff --git a/project/src/models/eft/match/IMatchGroupInviteSendRequest.ts b/project/src/models/eft/match/IMatchGroupInviteSendRequest.ts new file mode 100644 index 00000000..b1dddb36 --- /dev/null +++ b/project/src/models/eft/match/IMatchGroupInviteSendRequest.ts @@ -0,0 +1,5 @@ +export interface IMatchGroupInviteSendRequest +{ + to: string + inLobby: boolean +} diff --git a/project/src/models/eft/match/IMatchGroupPlayerRemoveRequest.ts b/project/src/models/eft/match/IMatchGroupPlayerRemoveRequest.ts new file mode 100644 index 00000000..6cdef152 --- /dev/null +++ b/project/src/models/eft/match/IMatchGroupPlayerRemoveRequest.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupPlayerRemoveRequest +{ + aidToKick: string +} diff --git a/project/src/models/eft/match/IMatchGroupStartGameRequest.ts b/project/src/models/eft/match/IMatchGroupStartGameRequest.ts new file mode 100644 index 00000000..9396124f --- /dev/null +++ b/project/src/models/eft/match/IMatchGroupStartGameRequest.ts @@ -0,0 +1,7 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; + +export interface IMatchGroupStartGameRequest +{ + groupId: string + servers: IServer[] +} diff --git a/project/src/models/eft/match/IGetGroupStatusRequestData.ts b/project/src/models/eft/match/IMatchGroupStatusRequest.ts similarity index 80% rename from project/src/models/eft/match/IGetGroupStatusRequestData.ts rename to project/src/models/eft/match/IMatchGroupStatusRequest.ts index d1488a40..e5587e67 100644 --- a/project/src/models/eft/match/IGetGroupStatusRequestData.ts +++ b/project/src/models/eft/match/IMatchGroupStatusRequest.ts @@ -1,6 +1,6 @@ import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData +export interface IMatchGroupStatusRequest { location: string savage: boolean diff --git a/project/src/models/eft/match/IMatchGroupStatusResponse.ts b/project/src/models/eft/match/IMatchGroupStatusResponse.ts new file mode 100644 index 00000000..4890b101 --- /dev/null +++ b/project/src/models/eft/match/IMatchGroupStatusResponse.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; + +export interface IMatchGroupStatusResponse +{ + players: IGroupCharacter[] + maxPveCountExceeded: boolean +} diff --git a/project/src/models/eft/match/IMatchGroupTransferRequest.ts b/project/src/models/eft/match/IMatchGroupTransferRequest.ts new file mode 100644 index 00000000..692e9cd4 --- /dev/null +++ b/project/src/models/eft/match/IMatchGroupTransferRequest.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupTransferRequest +{ + aidToChange: string +} diff --git a/project/src/models/eft/match/IProfileStatusRequest.ts b/project/src/models/eft/match/IProfileStatusRequest.ts new file mode 100644 index 00000000..b5039edb --- /dev/null +++ b/project/src/models/eft/match/IProfileStatusRequest.ts @@ -0,0 +1,4 @@ +export interface IProfileStatusRequest +{ + groupId: number +} diff --git a/project/src/models/eft/match/IProfileStatusResponse.ts b/project/src/models/eft/match/IProfileStatusResponse.ts new file mode 100644 index 00000000..48e85816 --- /dev/null +++ b/project/src/models/eft/match/IProfileStatusResponse.ts @@ -0,0 +1,7 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; + +export interface IProfileStatusResponse +{ + maxPveCountExceeded: boolean + profiles: ISessionStatus[] +} diff --git a/project/src/models/eft/match/IRaidSettings.ts b/project/src/models/eft/match/IRaidSettings.ts new file mode 100644 index 00000000..2a14a009 --- /dev/null +++ b/project/src/models/eft/match/IRaidSettings.ts @@ -0,0 +1,50 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; + +export interface IRaidSettings +{ + location: string + timeVariant: DateTime + raidMode: RaidMode + metabolismDisabled: boolean + playersSpawnPlace: PlayersSpawnPlace + timeAndWeatherSettings: TimeAndWeatherSettings + botSettings: BotSettings + wavesSettings: WavesSettings + side: SideType +} + +export interface TimeAndWeatherSettings +{ + isRandomTime: boolean + isRandomWeather: boolean + cloudinessType: CloudinessType + rainType: RainType + fogType: FogType + windType: WindSpeed + timeFlowType: TimeFlowType + hourOfDay: number +} + +export interface BotSettings +{ + isScavWars: boolean + botAmount: BotAmount +} + +export interface WavesSettings +{ + botAmount: BotAmount + botDifficulty: BotDifficulty + isBosses: boolean + isTaggedAndCursed: boolean +} diff --git a/project/src/models/eft/match/IRemovePlayerFromGroupRequest.ts b/project/src/models/eft/match/IRemovePlayerFromGroupRequest.ts deleted file mode 100644 index 60219e63..00000000 --- a/project/src/models/eft/match/IRemovePlayerFromGroupRequest.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface IRemovePlayerFromGroupRequest -{ - aidToKick: string -} diff --git a/project/src/models/eft/match/IRequestIdRequest.ts b/project/src/models/eft/match/IRequestIdRequest.ts new file mode 100644 index 00000000..a742c2ce --- /dev/null +++ b/project/src/models/eft/match/IRequestIdRequest.ts @@ -0,0 +1,4 @@ +export interface IRequestIdRequest +{ + requestId: string +} diff --git a/project/src/models/eft/match/ISendGroupInviteRequest.ts b/project/src/models/eft/match/ISendGroupInviteRequest.ts deleted file mode 100644 index 40d1a551..00000000 --- a/project/src/models/eft/match/ISendGroupInviteRequest.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface ISendGroupInviteRequest -{ - to: string - inLobby: boolean -} diff --git a/project/src/models/eft/match/IServer.ts b/project/src/models/eft/match/IServer.ts new file mode 100644 index 00000000..d5510fdd --- /dev/null +++ b/project/src/models/eft/match/IServer.ts @@ -0,0 +1,6 @@ +export interface IServer +{ + ping: number + ip: string + port: number +} diff --git a/project/src/models/eft/match/ISessionStatus.ts b/project/src/models/eft/match/ISessionStatus.ts new file mode 100644 index 00000000..0b76b4a9 --- /dev/null +++ b/project/src/models/eft/match/ISessionStatus.ts @@ -0,0 +1,16 @@ +export interface ISessionStatus +{ + profileid: string + profileToken: string + status: string + ip: string + port: number + sid: string + version?: string + location?: string + raidMode?: string + mode?: string + shortId?: string + // eslint-disable-next-line @typescript-eslint/naming-convention + additional_info?: any[] +} diff --git a/project/src/models/eft/match/ITransferGroupRequest.ts b/project/src/models/eft/match/ITransferGroupRequest.ts deleted file mode 100644 index ddce126a..00000000 --- a/project/src/models/eft/match/ITransferGroupRequest.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ITransferGroupRequest -{ - aidToChange: string -} diff --git a/project/src/models/eft/notifier/INotifier.ts b/project/src/models/eft/notifier/INotifier.ts index 99b5121d..f21d5a81 100644 --- a/project/src/models/eft/notifier/INotifier.ts +++ b/project/src/models/eft/notifier/INotifier.ts @@ -45,5 +45,5 @@ export enum NotificationType FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", - YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList", } diff --git a/project/src/routers/static/MatchStaticRouter.ts b/project/src/routers/static/MatchStaticRouter.ts index 5e2612a7..49fbd65c 100644 --- a/project/src/routers/static/MatchStaticRouter.ts +++ b/project/src/routers/static/MatchStaticRouter.ts @@ -4,10 +4,10 @@ import { RouteAction, StaticRouter } from "@spt-aki/di/Router"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; -import { IGroupCurrentResponse } from "@spt-aki/models/eft/match/IGroupCurrentResponse"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; @injectable() export class MatchStaticRouter extends StaticRouter @@ -41,7 +41,7 @@ export class MatchStaticRouter extends StaticRouter info: any, sessionID: string, output: string, - ): Promise> => + ): Promise> => { return this.matchCallbacks.joinMatch(url, info, sessionID); }, @@ -84,7 +84,7 @@ export class MatchStaticRouter extends StaticRouter info: any, sessionID: string, output: string, - ): Promise> => + ): Promise> => { return this.matchCallbacks.getGroupStatus(url, info, sessionID); }, @@ -96,7 +96,7 @@ export class MatchStaticRouter extends StaticRouter info: any, sessionID: string, output: string, - ): Promise> => + ): Promise> => { return this.matchCallbacks.joinMatch(url, info, sessionID); }, @@ -115,7 +115,7 @@ export class MatchStaticRouter extends StaticRouter info: IEmptyRequestData, sessionID: string, output: string, - ): Promise> => + ): Promise> => { return this.matchCallbacks.groupCurrent(url, info, sessionID); }, @@ -153,7 +153,7 @@ export class MatchStaticRouter extends StaticRouter info: any, sessionID: string, output: string, - ): Promise> => + ): Promise> => { return this.matchCallbacks.acceptGroupInvite(url, info, sessionID); }, diff --git a/project/src/services/MatchLocationService.ts b/project/src/services/MatchLocationService.ts index 758c4fc0..ad93afc7 100644 --- a/project/src/services/MatchLocationService.ts +++ b/project/src/services/MatchLocationService.ts @@ -1,5 +1,4 @@ import { inject, injectable } from "tsyringe"; -import { ICreateGroupRequestData } from "@spt-aki/models/eft/match/ICreateGroupRequestData"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { TimeUtil } from "@spt-aki/utils/TimeUtil";