From c4cfcdc3678dda06e143143b04f98e4a8948d788 Mon Sep 17 00:00:00 2001 From: Dev Date: Fri, 14 Jul 2023 12:31:38 +0100 Subject: [PATCH] Initial changes for 3.6.0 --- .../types/controllers/GameController.d.ts | 2 ++ .../controllers/InventoryController.d.ts | 4 ++- .../types/controllers/LocationController.d.ts | 4 +-- .../types/controllers/QuestController.d.ts | 17 +++++++++- .../types/helpers/AssortHelper.d.ts | 10 +++--- .../types/helpers/HideoutHelper.d.ts | 14 +++----- .../types/helpers/ItemHelper.d.ts | 10 +++--- .../types/helpers/QuestHelper.d.ts | 1 + .../types/helpers/RagfairTaxHelper.d.ts | 2 +- .../types/models/eft/common/IGlobals.d.ts | 15 +++++++++ .../models/eft/common/tables/IBotBase.d.ts | 1 + .../eft/common/tables/ITemplateItem.d.ts | 2 ++ .../eft/inventory/IAddItemRequestData.d.ts | 1 + .../eft/location/IAirdropLootResult.d.ts | 5 +++ .../types/models/enums/SeasonalEventType.d.ts | 5 +++ .../models/enums/WildSpawnTypeNumber.d.ts | 3 +- .../models/spt/config/IAirdropConfig.d.ts | 1 + .../models/spt/config/IHideoutConfig.d.ts | 1 + .../types/models/spt/config/IPmcConfig.d.ts | 8 +++++ .../types/models/spt/config/IQuestConfig.d.ts | 11 +++++++ .../spt/config/ISeasonalEventConfig.d.ts | 2 ++ .../models/spt/server/ISettingsBase.d.ts | 5 +++ .../types/services/PlayerService.d.ts | 21 +++++++----- .../types/services/SeasonalEventService.d.ts | 32 +++++++++++++++---- .../types/utils/DatabaseImporter.d.ts | 7 +++- 25 files changed, 142 insertions(+), 42 deletions(-) create mode 100644 TypeScript/1LogToConsole/types/models/eft/location/IAirdropLootResult.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/enums/SeasonalEventType.d.ts diff --git a/TypeScript/1LogToConsole/types/controllers/GameController.d.ts b/TypeScript/1LogToConsole/types/controllers/GameController.d.ts index 18c8091..8c1ef06 100644 --- a/TypeScript/1LogToConsole/types/controllers/GameController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/GameController.d.ts @@ -47,6 +47,8 @@ export declare class GameController { protected locationConfig: ILocationConfig; constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, encodingUtil: EncodingUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer); gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void; + /** Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json */ + protected validateQuestAssortUnlocksExist(): void; /** * BSG have two values for shotgun dispersion, we make sure both have the same value */ diff --git a/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts b/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts index 09c130c..845495f 100644 --- a/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts @@ -4,6 +4,7 @@ import { ItemHelper } from "../helpers/ItemHelper"; import { PaymentHelper } from "../helpers/PaymentHelper"; import { PresetHelper } from "../helpers/PresetHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; +import { QuestHelper } from "../helpers/QuestHelper"; import { IPmcData } from "../models/eft/common/IPmcData"; import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData"; @@ -44,6 +45,7 @@ export declare class InventoryController { protected fenceService: FenceService; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected ragfairOfferService: RagfairOfferService; protected profileHelper: ProfileHelper; protected paymentHelper: PaymentHelper; @@ -51,7 +53,7 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/1LogToConsole/types/controllers/LocationController.d.ts b/TypeScript/1LogToConsole/types/controllers/LocationController.d.ts index bd9815c..68ef599 100644 --- a/TypeScript/1LogToConsole/types/controllers/LocationController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/LocationController.d.ts @@ -3,9 +3,9 @@ import { LootGenerator } from "../generators/LootGenerator"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { ILocationBase } from "../models/eft/common/ILocationBase"; import { ILocationsGenerateAllResponse } from "../models/eft/common/ILocationsSourceDestinationBase"; +import { IAirdropLootResult } from "../models/eft/location/IAirdropLootResult"; import { AirdropTypeEnum } from "../models/enums/AirdropType"; import { IAirdropConfig } from "../models/spt/config/IAirdropConfig"; -import { LootItem } from "../models/spt/services/LootItem"; import { LootRequest } from "../models/spt/services/LootRequest"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; @@ -39,7 +39,7 @@ export declare class LocationController { * Generates it randomly based on config/airdrop.json values * @returns Array of LootItem objects */ - getAirdropLoot(): LootItem[]; + getAirdropLoot(): IAirdropLootResult; /** * Randomly pick a type of airdrop loot using weighted values from config * @returns airdrop type value diff --git a/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts b/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts index 48efeef..b0616a4 100644 --- a/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts @@ -19,6 +19,7 @@ import { DatabaseServer } from "../servers/DatabaseServer"; import { LocaleService } from "../services/LocaleService"; import { LocalisationService } from "../services/LocalisationService"; import { PlayerService } from "../services/PlayerService"; +import { SeasonalEventService } from "../services/SeasonalEventService"; import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class QuestController { @@ -34,10 +35,11 @@ export declare class QuestController { protected questConditionHelper: QuestConditionHelper; protected playerService: PlayerService; protected localeService: LocaleService; + protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); /** * Get all quests visible to player * Exclude quests with incomplete preconditions (level/loyalty) @@ -45,6 +47,19 @@ export declare class QuestController { * @returns array of IQuest */ getClientQuests(sessionID: string): IQuest[]; + /** + * Does a provided quest have a level requirement equal to or below defined level + * @param quest Quest to check + * @param playerLevel level of player to test against quest + * @returns true if quest can be seen/accepted by player of defined level + */ + protected playerLevelFulfillsQuestRequrement(quest: IQuest, playerLevel: number): boolean; + /** + * Should a quest be shown to the player in trader quest screen + * @param questId Quest to check + * @returns true = show to player + */ + protected showEventQuestToPlayer(questId: string): boolean; /** * Is the quest for the opposite side the player is on * @param playerSide Player side (usec/bear) diff --git a/TypeScript/1LogToConsole/types/helpers/AssortHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/AssortHelper.d.ts index bc66b09..df674c5 100644 --- a/TypeScript/1LogToConsole/types/helpers/AssortHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/AssortHelper.d.ts @@ -14,12 +14,12 @@ export declare class AssortHelper { protected questHelper: QuestHelper; constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper); /** - * Remove assorts from a trader that have not been unlocked yet - * @param pmcProfile player profile - * @param traderId traders id the assort belongs to + * Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest) + * @param pmcProfile Player profile + * @param traderId Traders id the assort belongs to * @param traderAssorts All assort items from same trader - * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders - * @returns assort items minus locked quest assorts + * @param mergedQuestAssorts Dict of quest assort to quest id unlocks for all traders (key = started/failed/complete) + * @returns Assort items minus locked quest assorts */ stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, traderAssorts: ITraderAssort, mergedQuestAssorts: Record>, flea?: boolean): ITraderAssort; /** diff --git a/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts index c718865..01539b8 100644 --- a/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts @@ -189,16 +189,16 @@ export declare class HideoutHelper { * @returns coin slot count */ protected getBTCSlots(pmcData: IPmcData): number; - /** - * Get a count of bitcoins player miner can hold - */ - protected getManagementSkillsSlots(): number; /** * Does profile have elite hideout management skill * @param pmcData Profile to look at * @returns True if profile has skill */ protected hasEliteHideoutManagementSkill(pmcData: IPmcData): boolean; + /** + * Get a count of bitcoins player miner can hold + */ + protected getBitcoinMinerContainerSlotSize(): number; /** * Get the hideout management skill from player profile * @param pmcData Profile to look at @@ -206,12 +206,6 @@ export declare class HideoutHelper { */ protected getHideoutManagementSkill(pmcData: IPmcData): Common; protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number; - /** - * Get the crafting skill details from player profile - * @param pmcData Player profile - * @returns crafting skill, null if not found - */ - protected getCraftingSkill(pmcData: IPmcData): Common; /** * Adjust craft time based on crafting skill level found in player profile * @param pmcData Player profile diff --git a/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts index 98fe95e..78f5c30 100644 --- a/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts @@ -186,14 +186,14 @@ declare class ItemHelper { */ findBarterItems(by: "tpl" | "id", pmcData: IPmcData, barterItemId: string): Item[]; /** - * - * @param pmcData - * @param items + * Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table) + * @param pmcData Player profile + * @param items Items to adjust ID values of * @param insuredItems insured items to not replace ids for * @param fastPanel - * @returns + * @returns Item[] */ - replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[]; + replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[]; /** * WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do * @param {string} tpl Items tpl to check parents of diff --git a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts index dcfc5ae..369e29d 100644 --- a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts @@ -63,6 +63,7 @@ export declare class QuestHelper { getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[]; /** * Increase skill points of a skill on player profile + * Dupe of PlayerService.incrementSkillLevel() * @param sessionID Session id * @param pmcData Player profile * @param skillName Name of skill to increase skill points of diff --git a/TypeScript/1LogToConsole/types/helpers/RagfairTaxHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RagfairTaxHelper.d.ts index 820facb..5ba2917 100644 --- a/TypeScript/1LogToConsole/types/helpers/RagfairTaxHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/RagfairTaxHelper.d.ts @@ -1,10 +1,10 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { RagfairPriceService } from "../services/RagfairPriceService"; import { ItemHelper } from "./ItemHelper"; -import { ILogger } from "../models/spt/utils/ILogger"; export declare class RagfairTaxHelper { protected logger: ILogger; protected databaseServer: DatabaseServer; diff --git a/TypeScript/1LogToConsole/types/models/eft/common/IGlobals.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/IGlobals.d.ts index f1845f6..def7fcb 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/IGlobals.d.ts @@ -3,6 +3,7 @@ export interface IGlobals { time: number; config: Config; bot_presets: BotPreset[]; + AudioSettings: IAudioSettings; BotWeaponScatterings: BotWeaponScattering[]; ItemPresets: Record; } @@ -1299,6 +1300,20 @@ export interface BotPreset { FIRST_CONTACT_ADD_SEC: number; COEF_IF_MOVE: number; } +export interface IAudioSettings { + AudioGroupPresets: IAudioGroupPreset[]; +} +export interface IAudioGroupPreset { + AngleToAllowBinaural: number; + DisabledBinauralByDistance: boolean; + DistanceToAllowBinaural: number; + GroupType: number; + HeightToAllowBinaural: number; + Name: string; + OcclusionEnabled: boolean; + OcclusionIntensity: number; + OverallVolume: number; +} export interface BotWeaponScattering { Name: string; PriorityScatter1meter: number; diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts index cd4169d..e5d1c30 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts @@ -40,6 +40,7 @@ export interface Info { Nickname: string; LowerNickname: string; Side: string; + SquadInviteRestriction: boolean; Voice: string; Level: number; Experience: number; diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/ITemplateItem.d.ts index 46ea7a1..24fa8fb 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/ITemplateItem.d.ts @@ -36,6 +36,7 @@ export interface Props { IsUnremovable?: boolean; IsLockedafterEquip?: boolean; IsSpecialSlotOnly?: boolean; + IsStationaryWeapon?: boolean; QuestItem?: boolean; QuestStashMaxCount?: number; LootExperience?: number; @@ -257,6 +258,7 @@ export interface Props { CutoffFreq?: number; Resonance?: number; RolloffMultiplier?: number; + ReverbVolume: number; CompressorVolume?: number; AmbientVolume?: number; DryVolume?: number; diff --git a/TypeScript/1LogToConsole/types/models/eft/inventory/IAddItemRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/inventory/IAddItemRequestData.d.ts index 61516d6..24f3e31 100644 --- a/TypeScript/1LogToConsole/types/models/eft/inventory/IAddItemRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/inventory/IAddItemRequestData.d.ts @@ -1,4 +1,5 @@ export interface IAddItemRequestData { + /** Trader id */ tid: string; items: AddItem[]; } diff --git a/TypeScript/1LogToConsole/types/models/eft/location/IAirdropLootResult.d.ts b/TypeScript/1LogToConsole/types/models/eft/location/IAirdropLootResult.d.ts new file mode 100644 index 0000000..6db4b16 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/location/IAirdropLootResult.d.ts @@ -0,0 +1,5 @@ +import { LootItem } from "../../../models/spt/services/LootItem"; +export interface IAirdropLootResult { + dropType: string; + loot: LootItem[]; +} diff --git a/TypeScript/1LogToConsole/types/models/enums/SeasonalEventType.d.ts b/TypeScript/1LogToConsole/types/models/enums/SeasonalEventType.d.ts new file mode 100644 index 0000000..03aa557 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/enums/SeasonalEventType.d.ts @@ -0,0 +1,5 @@ +export declare enum SeasonalEventType { + NONE = "None", + CHRISTMAS = "Christmas", + HALLOWEEN = "Halloween" +} diff --git a/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts index 03c6a0e..f3a4b36 100644 --- a/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts @@ -30,5 +30,6 @@ export declare enum WildSpawnTypeNumber { FOLLOWERBIRDEYE = 28, BOSSZRYACHIY = 29, FOLLOWERZRYACHIY = 30, - ARENAFIGHTEREVENT = 31 + ARENAFIGHTER = 31, + ARENAFIGHTEREVENT = 32 } diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IAirdropConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IAirdropConfig.d.ts index 4aba484..4c8eae0 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IAirdropConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IAirdropConfig.d.ts @@ -10,6 +10,7 @@ export interface IAirdropConfig extends IBaseConfig { planeVolume: number; planeSpeed: number; crateFallSpeed: number; + containerIds: Record; airdropMinStartTimeSeconds: number; airdropMaxStartTimeSeconds: number; loot: Record; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IHideoutConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IHideoutConfig.d.ts index 0785f1e..d189939 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IHideoutConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IHideoutConfig.d.ts @@ -4,4 +4,5 @@ export interface IHideoutConfig extends IBaseConfig { runIntervalSeconds: number; hoursForSkillCrafting: number; hideoutWallAppearTimeSeconds: number; + expCraftAmount: number; } diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts index 87098da..b28c564 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts @@ -1,7 +1,15 @@ +import { MemberCategory } from "../../../models/enums/MemberCategory"; import { MinMax } from "../../common/MinMax"; export interface IPmcConfig { + /** What game version should the PMC have */ + gameVersionWeight: Record; + /** What account type should the PMC have */ + accountTypeWeight: Record; + /** Global whitelist/blacklist of vest loot for PMCs */ vestLoot: SlotLootSettings; + /** Global whitelist/blacklist of pocket loot for PMCs */ pocketLoot: SlotLootSettings; + /** Global whitelist/blacklist of backpack loot for PMCs */ backpackLoot: SlotLootSettings; dynamicLoot: DynamicLoot; useDifficultyOverride: boolean; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IQuestConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IQuestConfig.d.ts index 94c00fd..8ce461b 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IQuestConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IQuestConfig.d.ts @@ -1,10 +1,14 @@ import { MinMax } from "../../../models/common/MinMax"; +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { ELocationName } from "../../enums/ELocationName"; import { IBaseConfig } from "./IBaseConfig"; export interface IQuestConfig extends IBaseConfig { kind: "aki-quest"; redeemTime: number; questTemplateIds: IPlayerTypeQuestIds; + /** Show non-seasonal quests be shown to player */ + showNonSeasonalEventQuests: boolean; + eventQuests: Record; repeatableQuests: IRepeatableQuestConfig[]; locationIdMap: Record; bearOnlyQuests: string[]; @@ -19,6 +23,13 @@ export interface IQuestTypeIds { Completion: string; Exploration: string; } +export interface IEventQuestData { + name: string; + season: SeasonalEventType; + startTimestamp: number; + endTimestamp: number; + yearly: boolean; +} export interface IRepeatableQuestConfig { name: string; side: string; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/ISeasonalEventConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/ISeasonalEventConfig.d.ts index cedf9a9..7a5295c 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/ISeasonalEventConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/ISeasonalEventConfig.d.ts @@ -1,3 +1,4 @@ +import { SeasonalEventType } from "../../../models/enums/SeasonalEventType"; import { IBaseConfig } from "./IBaseConfig"; export interface ISeasonalEventConfig extends IBaseConfig { kind: "aki-seasonalevents"; @@ -9,6 +10,7 @@ export interface ISeasonalEventConfig extends IBaseConfig { } export interface ISeasonalEvent { name: string; + type: SeasonalEventType; startDay: number; startMonth: number; endDay: number; diff --git a/TypeScript/1LogToConsole/types/models/spt/server/ISettingsBase.d.ts b/TypeScript/1LogToConsole/types/models/spt/server/ISettingsBase.d.ts index 2870cfb..6be2ad4 100644 --- a/TypeScript/1LogToConsole/types/models/spt/server/ISettingsBase.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/server/ISettingsBase.d.ts @@ -27,6 +27,7 @@ export interface Config { TurnOffLogging: boolean; WeaponOverlapDistanceCulling: number; WebDiagnosticsEnabled: boolean; + NetworkStateView: INetworkStateView; } export interface FramerateLimit { MaxFramerateGameLimit: number; @@ -46,3 +47,7 @@ export interface ReleaseProfiler { MaxRecords: number; RecordTriggerValue: number; } +export interface INetworkStateView { + LossThreshold: number; + RttThreshold: number; +} diff --git a/TypeScript/1LogToConsole/types/services/PlayerService.d.ts b/TypeScript/1LogToConsole/types/services/PlayerService.d.ts index 1195b93..458ce82 100644 --- a/TypeScript/1LogToConsole/types/services/PlayerService.d.ts +++ b/TypeScript/1LogToConsole/types/services/PlayerService.d.ts @@ -1,22 +1,27 @@ import { IPmcData } from "../models/eft/common/IPmcData"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { TimeUtil } from "../utils/TimeUtil"; import { LocalisationService } from "./LocalisationService"; export declare class PlayerService { protected logger: ILogger; + protected timeUtil: TimeUtil; protected localisationService: LocalisationService; protected databaseServer: DatabaseServer; - constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer); + constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer); /** - * increases the profile skill and updates any output - * @param {Object} pmcData - * @param {String} skillName - * @param {Number} amount + * Dupe of QuestHelper.rewardsSkillPoints() + * Add xp to a player skill + * @param pmcData Player profile + * @param skillName Name of skill to increment + * @param amount Amount of skill points to add to skill + * @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code */ - incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number): void; + incrementSkillLevel(pmcData: IPmcData, skillName: string, amount: number, useSkillProgressRateMultipler?: boolean): void; /** - * @param {Object} pmcData - * @returns number + * Get level of player + * @param pmcData Player profile + * @returns Level of player */ calculateLevel(pmcData: IPmcData): number; } diff --git a/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts b/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts index 7474018..2776084 100644 --- a/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts +++ b/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts @@ -1,20 +1,26 @@ import { BotHelper } from "../helpers/BotHelper"; import { Config } from "../models/eft/common/IGlobals"; import { Inventory } from "../models/eft/common/tables/IBotType"; +import { SeasonalEventType } from "../models/enums/SeasonalEventType"; +import { IHttpConfig } from "../models/spt/config/IHttpConfig"; +import { IQuestConfig } from "../models/spt/config/IQuestConfig"; import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig"; import { ILogger } from "../models/spt/utils/ILogger"; import { ConfigServer } from "../servers/ConfigServer"; import { DatabaseServer } from "../servers/DatabaseServer"; +import { DatabaseImporter } from "../utils/DatabaseImporter"; import { LocalisationService } from "./LocalisationService"; export declare class SeasonalEventService { protected logger: ILogger; protected databaseServer: DatabaseServer; + protected databaseImporter: DatabaseImporter; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; protected seasonalEventConfig: ISeasonalEventConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); - protected get events(): Record; + protected questConfig: IQuestConfig; + protected httpConfig: IHttpConfig; + constructor(logger: ILogger, databaseServer: DatabaseServer, databaseImporter: DatabaseImporter, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); protected get christmasEventItems(): string[]; protected get halloweenEventItems(): string[]; /** @@ -52,12 +58,12 @@ export declare class SeasonalEventService { */ seasonalEventEnabled(): boolean; /** - * is christmas event active + * Is christmas event active (Globals eventtype array contains even name) * @returns true if active */ christmasEventEnabled(): boolean; /** - * is christmas event active + * is halloween event active (Globals eventtype array contains even name) * @returns true if active */ halloweenEventEnabled(): boolean; @@ -71,12 +77,19 @@ export declare class SeasonalEventService { * @param eventName Name of event to get gear changes for * @returns bots with equipment changes */ - protected getEventBotGear(eventName: string): Record>>; + protected getEventBotGear(eventType: SeasonalEventType): Record>>; /** * Get the dates each seasonal event starts and ends at * @returns Record with event name + start/end date */ getEventDetails(): ISeasonalEvent[]; + /** + * Look up quest in configs/quest.json + * @param questId Quest to look up + * @param event event type (Christmas/Halloween/None) + * @returns true if related + */ + isQuestRelatedToEvent(questId: string, event: SeasonalEventType): boolean; /** * Check if current date falls inside any of the seasons events pased in, if so, handle them */ @@ -92,7 +105,12 @@ export declare class SeasonalEventService { * @param globalConfig globals.json * @param eventName Name of the event to enable. e.g. Christmas */ - protected updateGlobalEvents(globalConfig: Config, eventName: string): void; + protected updateGlobalEvents(globalConfig: Config, eventType: SeasonalEventType): void; + /** + * Change trader icons to be more event themed (Halloween only so far) + * @param eventType What event is active + */ + protected adjustTraderIcons(eventType: SeasonalEventType): void; /** * Add lootble items from backpack into patrol.ITEMS_TO_DROP difficulty property */ @@ -101,7 +119,7 @@ export declare class SeasonalEventService { * Read in data from seasonalEvents.json and add found equipment items to bots * @param eventName Name of the event to read equipment in from config */ - protected addEventGearToBots(eventName: string): void; + protected addEventGearToBots(eventType: SeasonalEventType): void; protected addPumpkinsToScavBackpacks(): void; /** * Set Khorovod(dancing tree) chance to 100% on all maps that support it diff --git a/TypeScript/1LogToConsole/types/utils/DatabaseImporter.d.ts b/TypeScript/1LogToConsole/types/utils/DatabaseImporter.d.ts index 7698f07..ceb3d2b 100644 --- a/TypeScript/1LogToConsole/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/1LogToConsole/types/utils/DatabaseImporter.d.ts @@ -26,6 +26,11 @@ export declare class DatabaseImporter implements OnLoad { private filepath; protected httpConfig: IHttpConfig; constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer); + /** + * Get path to aki data + * @returns path to data + */ + getSptDataPath(): string; onLoad(): Promise; /** * Read all json files in database folder and map into a json object @@ -39,7 +44,7 @@ export declare class DatabaseImporter implements OnLoad { * Find and map files with image router inside a designated path * @param filepath Path to find files in */ - loadImages(filepath: string, routes: string[]): void; + loadImages(filepath: string, directories: string[], routes: string[]): void; /** * Check for a path override in the http json config file * @param imagePath Key