Skip to content

Commit

Permalink
Update types
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchangelWTF committed Jan 12, 2025
1 parent 133bffd commit 6c2b1c6
Show file tree
Hide file tree
Showing 59 changed files with 745 additions and 397 deletions.
5 changes: 5 additions & 0 deletions types/callbacks/HideoutCallbacks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideou
import type { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData";
import type { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
import type { IHideoutCustomizationApplyRequestData } from "@spt/models/eft/hideout/IHideoutCustomizationApplyRequestData";
import { IHideoutCustomizationSetMannequinPoseRequest } from "@spt/models/eft/hideout/IHideoutCustomizationSetMannequinPoseRequest";
import type { IHideoutDeleteProductionRequestData } from "@spt/models/eft/hideout/IHideoutDeleteProductionRequestData";
import type { IHideoutImproveAreaRequestData } from "@spt/models/eft/hideout/IHideoutImproveAreaRequestData";
import type { IHideoutPutItemInRequestData } from "@spt/models/eft/hideout/IHideoutPutItemInRequestData";
Expand Down Expand Up @@ -90,6 +91,10 @@ export declare class HideoutCallbacks implements OnUpdate {
* Handle client/game/profile/items/moving - HideoutCustomizationApply
*/
hideoutCustomizationApplyCommand(pmcData: IPmcData, request: IHideoutCustomizationApplyRequestData, sessionId: string): IItemEventRouterResponse;
/**
* Handle client/game/profile/items/moving - hideoutCustomizationSetMannequinPose
*/
hideoutCustomizationSetMannequinPose(pmcData: IPmcData, request: IHideoutCustomizationSetMannequinPoseRequest, sessionId: string): IItemEventRouterResponse;
onUpdate(timeSinceLastRun: number): Promise<boolean>;
getRoute(): string;
}
4 changes: 3 additions & 1 deletion types/callbacks/PrestigeCallbacks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
import type { IEmptyRequestData } from "@spt/models/eft/common/IEmptyRequestData";
import { IPrestige } from "@spt/models/eft/common/tables/IPrestige";
import type { IGetBodyResponseData } from "@spt/models/eft/httpResponse/IGetBodyResponseData";
import { INullResponseData } from "@spt/models/eft/httpResponse/INullResponseData";
import { IObtainPrestigeRequest } from "@spt/models/eft/prestige/IObtainPrestigeRequest";
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
export declare class PrestigeCallbacks {
protected httpServerHelper: HttpServerHelper;
Expand All @@ -12,5 +14,5 @@ export declare class PrestigeCallbacks {
/** Handle client/prestige/list */
getPrestige(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPrestige>;
/** Handle client/prestige/obtain */
obtainPrestige(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
obtainPrestige(url: string, info: IObtainPrestigeRequest, sessionID: string): INullResponseData;
}
2 changes: 0 additions & 2 deletions types/controllers/CustomizationController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import type { IBuyClothingRequestData, IPaymentItemForClothing } from "@spt/mode
import type { CustomizationSetOption, ICustomizationSetRequest } from "@spt/models/eft/customization/ICustomizationSetRequest";
import type { IHideoutCustomisation } from "@spt/models/eft/hideout/IHideoutCustomisation";
import type { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { ISptProfile } from "@spt/models/eft/profile/ISptProfile";
import type { ILogger } from "@spt/models/spt/utils/ILogger";
import { EventOutputHolder } from "@spt/routers/EventOutputHolder";
import { SaveServer } from "@spt/servers/SaveServer";
Expand Down Expand Up @@ -72,7 +71,6 @@ export declare class CustomizationController {
getHideoutCustomisation(sessionID: string, info: IEmptyRequestData): IHideoutCustomisation;
/** Handle client/customization/storage */
getCustomisationStorage(sessionID: string, info: IEmptyRequestData): ICustomisationStorage[];
protected getGameEdition(profile: ISptProfile): string;
/** Handle CustomizationSet event */
setClothing(sessionId: string, request: ICustomizationSetRequest, pmcData: IPmcData): IItemEventRouterResponse;
/**
Expand Down
3 changes: 2 additions & 1 deletion types/controllers/GameController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { ICurrentGroupResponse } from "@spt/models/eft/game/ICurrentGroupRespons
import { IGameConfigResponse } from "@spt/models/eft/game/IGameConfigResponse";
import { IGameKeepAliveResponse } from "@spt/models/eft/game/IGameKeepAliveResponse";
import { IGameModeRequestData } from "@spt/models/eft/game/IGameModeRequestData";
import { IGameModeResponse } from "@spt/models/eft/game/IGameModeResponse";
import { IGetRaidTimeRequest } from "@spt/models/eft/game/IGetRaidTimeRequest";
import { IGetRaidTimeResponse } from "@spt/models/eft/game/IGetRaidTimeResponse";
import { IServerDetails } from "@spt/models/eft/game/IServerDetails";
Expand Down Expand Up @@ -81,7 +82,7 @@ export declare class GameController {
/**
* Handle client/game/mode
*/
getGameMode(sessionID: string, info: IGameModeRequestData): any;
getGameMode(sessionID: string, info: IGameModeRequestData): IGameModeResponse;
/**
* Handle client/server/list
*/
Expand Down
9 changes: 9 additions & 0 deletions types/controllers/HideoutController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import type { IHideoutCancelProductionRequestData } from "@spt/models/eft/hideou
import type { IHideoutCircleOfCultistProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutCircleOfCultistProductionStartRequestData";
import type { IHideoutContinuousProductionStartRequestData } from "@spt/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
import type { IHideoutCustomizationApplyRequestData } from "@spt/models/eft/hideout/IHideoutCustomizationApplyRequestData";
import { IHideoutCustomizationSetMannequinPoseRequest } from "@spt/models/eft/hideout/IHideoutCustomizationSetMannequinPoseRequest";
import type { IHideoutDeleteProductionRequestData } from "@spt/models/eft/hideout/IHideoutDeleteProductionRequestData";
import type { IHideoutImproveAreaRequestData } from "@spt/models/eft/hideout/IHideoutImproveAreaRequestData";
import type { IHideoutProduction } from "@spt/models/eft/hideout/IHideoutProduction";
Expand Down Expand Up @@ -304,6 +305,14 @@ export declare class HideoutController {
* @param request Client request data
*/
hideoutCustomizationApply(sessionId: string, pmcData: IPmcData, request: IHideoutCustomizationApplyRequestData): IItemEventRouterResponse;
/**
* Handle HideoutCustomizationSetMannequinPose event
* @param sessionId Session id
* @param pmcData Player profile
* @param request Client request data
* @returns Client response
*/
hideoutCustomizationSetMannequinPose(sessionId: string, pmcData: IPmcData, request: IHideoutCustomizationSetMannequinPoseRequest): IItemEventRouterResponse;
protected getHideoutCustomisationType(type: string): string;
/**
* Function called every `hideoutConfig.runIntervalSeconds` seconds as part of onUpdate event
Expand Down
3 changes: 2 additions & 1 deletion types/controllers/PrestigeController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPrestige } from "@spt/models/eft/common/tables/IPrestige";
import { IObtainPrestigeRequest } from "@spt/models/eft/prestige/IObtainPrestigeRequest";
import type { ILogger } from "@spt/models/spt/utils/ILogger";
import { EventOutputHolder } from "@spt/routers/EventOutputHolder";
import { SaveServer } from "@spt/servers/SaveServer";
Expand Down Expand Up @@ -43,5 +44,5 @@ export declare class PrestigeController {
/**
* Handle /client/prestige/obtain
*/
obtainPrestige(sessionID: string, info: IEmptyRequestData): any;
obtainPrestige(sessionID: string, request: IObtainPrestigeRequest): void;
}
6 changes: 5 additions & 1 deletion types/controllers/ProfileController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { DialogueHelper } from "@spt/helpers/DialogueHelper";
import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { QuestRewardHelper } from "@spt/helpers/QuestRewardHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
Expand Down Expand Up @@ -46,8 +47,9 @@ export declare class ProfileController {
protected traderHelper: TraderHelper;
protected dialogueHelper: DialogueHelper;
protected questHelper: QuestHelper;
protected questRewardHelper: QuestRewardHelper;
protected profileHelper: ProfileHelper;
constructor(logger: ILogger, hashUtil: HashUtil, cloner: ICloner, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, mailSendService: MailSendService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
constructor(logger: ILogger, hashUtil: HashUtil, cloner: ICloner, timeUtil: TimeUtil, saveServer: SaveServer, databaseService: DatabaseService, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, mailSendService: MailSendService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, questRewardHelper: QuestRewardHelper, profileHelper: ProfileHelper);
/**
* Handle /launcher/profiles
*/
Expand All @@ -67,6 +69,8 @@ export declare class ProfileController {
* @returns Profiles _id value
*/
createProfile(info: IProfileCreateRequestData, sessionID: string): string;
protected addCustomisationUnlocksToProfile(fullProfile: ISptProfile): void;
protected getGameEdition(profile: ISptProfile): string;
/**
* make profiles pmcData.Inventory.equipment unique
* @param pmcData Profile to update
Expand Down
4 changes: 3 additions & 1 deletion types/controllers/QuestController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ItemHelper } from "@spt/helpers/ItemHelper";
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
import { QuestConditionHelper } from "@spt/helpers/QuestConditionHelper";
import { QuestHelper } from "@spt/helpers/QuestHelper";
import { QuestRewardHelper } from "@spt/helpers/QuestRewardHelper";
import { TraderHelper } from "@spt/helpers/TraderHelper";
import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IItem } from "@spt/models/eft/common/tables/IItem";
Expand Down Expand Up @@ -37,14 +38,15 @@ export declare class QuestController {
protected profileHelper: ProfileHelper;
protected traderHelper: TraderHelper;
protected questHelper: QuestHelper;
protected questRewardHelper: QuestRewardHelper;
protected questConditionHelper: QuestConditionHelper;
protected playerService: PlayerService;
protected localeService: LocaleService;
protected localisationService: LocalisationService;
protected configServer: ConfigServer;
protected cloner: ICloner;
protected questConfig: IQuestConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner);
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseService: DatabaseService, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questRewardHelper: QuestRewardHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner);
/**
* Handle client/quest/list
* Get all quests visible to player
Expand Down
6 changes: 3 additions & 3 deletions types/controllers/RepeatableQuestController.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { PaymentService } from "@spt/services/PaymentService";
import { ProfileFixerService } from "@spt/services/ProfileFixerService";
import { HashUtil } from "@spt/utils/HashUtil";
import { HttpResponseUtil } from "@spt/utils/HttpResponseUtil";
import { ObjectId } from "@spt/utils/ObjectId";
import { RandomUtil } from "@spt/utils/RandomUtil";
import { TimeUtil } from "@spt/utils/TimeUtil";
import type { ICloner } from "@spt/utils/cloners/ICloner";
export declare class RepeatableQuestController {
protected logger: ILogger;
protected hashUtil: HashUtil;
protected databaseService: DatabaseService;
protected timeUtil: TimeUtil;
protected randomUtil: RandomUtil;
Expand All @@ -34,14 +35,13 @@ export declare class RepeatableQuestController {
protected localisationService: LocalisationService;
protected eventOutputHolder: EventOutputHolder;
protected paymentService: PaymentService;
protected objectId: ObjectId;
protected repeatableQuestGenerator: RepeatableQuestGenerator;
protected repeatableQuestHelper: RepeatableQuestHelper;
protected questHelper: QuestHelper;
protected configServer: ConfigServer;
protected cloner: ICloner;
protected questConfig: IQuestConfig;
constructor(logger: ILogger, databaseService: DatabaseService, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner);
constructor(logger: ILogger, hashUtil: HashUtil, databaseService: DatabaseService, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner);
/**
* Handle client/repeatalbeQuests/activityPeriods
* Returns an array of objects in the format of repeatable quests to the client.
Expand Down
3 changes: 2 additions & 1 deletion types/generators/BotLootGenerator.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
import { EquipmentSlots } from "@spt/models/enums/EquipmentSlots";
import { IItemSpawnLimitSettings } from "@spt/models/spt/bots/IItemSpawnLimitSettings";
import { IBotConfig } from "@spt/models/spt/config/IBotConfig";
import { IPmcConfig } from "@spt/models/spt/config/IPmcConfig";
import { IMinMaxLootItemValue, IPmcConfig } from "@spt/models/spt/config/IPmcConfig";
import type { ILogger } from "@spt/models/spt/utils/ILogger";
import { ConfigServer } from "@spt/servers/ConfigServer";
import { BotLootCacheService } from "@spt/services/BotLootCacheService";
Expand Down Expand Up @@ -59,6 +59,7 @@ export declare class BotLootGenerator {
* @returns number
*/
protected getBackpackRoubleTotalByLevel(botLevel: number, isPmc: boolean): number;
protected getSingleItemLootPriceLimits(botLevel: number, isPmc: boolean): IMinMaxLootItemValue | undefined;
/**
* Get an array of the containers a bot has on them (pockets/backpack/vest)
* @param botInventory Bot to check
Expand Down
6 changes: 3 additions & 3 deletions types/generators/LocationLootGenerator.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { DatabaseService } from "@spt/services/DatabaseService";
import { ItemFilterService } from "@spt/services/ItemFilterService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { SeasonalEventService } from "@spt/services/SeasonalEventService";
import { HashUtil } from "@spt/utils/HashUtil";
import { MathUtil } from "@spt/utils/MathUtil";
import { ObjectId } from "@spt/utils/ObjectId";
import { ProbabilityObjectArray, RandomUtil } from "@spt/utils/RandomUtil";
import type { ICloner } from "@spt/utils/cloners/ICloner";
export interface IContainerItem {
Expand All @@ -30,8 +30,8 @@ export interface IContainerGroupCount {
}
export declare class LocationLootGenerator {
protected logger: ILogger;
protected hashUtil: HashUtil;
protected databaseService: DatabaseService;
protected objectId: ObjectId;
protected randomUtil: RandomUtil;
protected itemHelper: ItemHelper;
protected mathUtil: MathUtil;
Expand All @@ -44,7 +44,7 @@ export declare class LocationLootGenerator {
protected cloner: ICloner;
protected locationConfig: ILocationConfig;
protected seasonalEventConfig: ISeasonalEventConfig;
constructor(logger: ILogger, databaseService: DatabaseService, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner);
constructor(logger: ILogger, hashUtil: HashUtil, databaseService: DatabaseService, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner);
/**
* Create an array of container objects with randomised loot
* @param locationBase Map base to generate containers for
Expand Down
6 changes: 3 additions & 3 deletions types/generators/RepeatableQuestGenerator.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@ import type { ILogger } from "@spt/models/spt/utils/ILogger";
import { ConfigServer } from "@spt/servers/ConfigServer";
import { DatabaseService } from "@spt/services/DatabaseService";
import { LocalisationService } from "@spt/services/LocalisationService";
import { HashUtil } from "@spt/utils/HashUtil";
import { MathUtil } from "@spt/utils/MathUtil";
import { ObjectId } from "@spt/utils/ObjectId";
import { ProbabilityObjectArray, RandomUtil } from "@spt/utils/RandomUtil";
import type { ICloner } from "@spt/utils/cloners/ICloner";
export declare class RepeatableQuestGenerator {
protected logger: ILogger;
protected hashUtil: HashUtil;
protected randomUtil: RandomUtil;
protected mathUtil: MathUtil;
protected databaseService: DatabaseService;
protected itemHelper: ItemHelper;
protected localisationService: LocalisationService;
protected objectId: ObjectId;
protected repeatableQuestHelper: RepeatableQuestHelper;
protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator;
protected configServer: ConfigServer;
protected cloner: ICloner;
protected questConfig: IQuestConfig;
protected maxRandomNumberAttempts: number;
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner);
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner);
/**
* This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
* It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest
Expand Down
Loading

0 comments on commit 6c2b1c6

Please sign in to comment.