Update types
This commit is contained in:
parent
7687be6681
commit
385a4f0c19
@ -61,6 +61,10 @@ export declare class GameController {
|
|||||||
* Handle client/game/start
|
* Handle client/game/start
|
||||||
*/
|
*/
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||||
|
/**
|
||||||
|
* Out of date/incorrectly made trader mods forget this data
|
||||||
|
*/
|
||||||
|
protected checkTraderRepairValuesExist(): void;
|
||||||
protected addCustomLooseLootPositions(): void;
|
protected addCustomLooseLootPositions(): void;
|
||||||
protected adjustLooseLootSpawnProbabilities(): void;
|
protected adjustLooseLootSpawnProbabilities(): void;
|
||||||
protected setHideoutAreasAndCraftsTo40Secs(): void;
|
protected setHideoutAreasAndCraftsTo40Secs(): void;
|
||||||
|
@ -8,7 +8,7 @@ import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGet
|
|||||||
import { IGetInsuranceCostResponseData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostResponseData";
|
import { IGetInsuranceCostResponseData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostResponseData";
|
||||||
import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData";
|
import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { Insurance, ISystemData } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { ISystemData, Insurance } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
|
@ -13,6 +13,7 @@ import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||||
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
@ -21,8 +22,9 @@ import { ObjectId } from "@spt-aki/utils/ObjectId";
|
|||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
export declare class RepeatableQuestController {
|
export declare class RepeatableQuestController {
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
@ -37,7 +39,7 @@ export declare class RepeatableQuestController {
|
|||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Handle client/repeatalbeQuests/activityPeriods
|
* Handle client/repeatalbeQuests/activityPeriods
|
||||||
* Returns an array of objects in the format of repeatable quests to the client.
|
* Returns an array of objects in the format of repeatable quests to the client.
|
||||||
@ -64,6 +66,13 @@ export declare class RepeatableQuestController {
|
|||||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
|
/**
|
||||||
|
* Get the number of quests to generate - takes into account charisma state of player
|
||||||
|
* @param repeatableConfig Config
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @returns Quest count
|
||||||
|
*/
|
||||||
|
protected getQuestCount(repeatableConfig: IRepeatableQuestConfig, pmcData: IPmcData): number;
|
||||||
/**
|
/**
|
||||||
* Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
|
* Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
|
||||||
* @param repeatableConfig daily/weekly config
|
* @param repeatableConfig daily/weekly config
|
||||||
|
@ -179,7 +179,7 @@ export declare class BotEquipmentModGenerator {
|
|||||||
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
||||||
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
||||||
* @param items The items where the CylinderMagazine's camora are appended to
|
* @param items The items where the CylinderMagazine's camora are appended to
|
||||||
* @param modPool modPool which should include available cartrigdes
|
* @param modPool modPool which should include available cartridges
|
||||||
* @param parentId The CylinderMagazine's UID
|
* @param parentId The CylinderMagazine's UID
|
||||||
* @param parentTemplate The CylinderMagazine's template
|
* @param parentTemplate The CylinderMagazine's template
|
||||||
*/
|
*/
|
||||||
|
@ -83,7 +83,7 @@ export declare class BotLootGenerator {
|
|||||||
* @param equipmentSlot slot to place the preset in (backpack)
|
* @param equipmentSlot slot to place the preset in (backpack)
|
||||||
* @param templateInventory bots template, assault.json
|
* @param templateInventory bots template, assault.json
|
||||||
* @param modChances chances for mods to spawn on weapon
|
* @param modChances chances for mods to spawn on weapon
|
||||||
* @param botRole bots role, .e.g. pmcBot
|
* @param botRole bots role .e.g. pmcBot
|
||||||
* @param isPmc are we generating for a pmc
|
* @param isPmc are we generating for a pmc
|
||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
@ -120,16 +120,16 @@ export declare class BotLootGenerator {
|
|||||||
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
||||||
/**
|
/**
|
||||||
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
||||||
* @param isPmc is this a PMC
|
* @param isPmc Is money on a PMC bot
|
||||||
* @param itemTemplate item details
|
* @param itemTemplate item details from db
|
||||||
* @param moneyItem Money stack to randomise
|
* @param moneyItem Money item to randomise
|
||||||
*/
|
*/
|
||||||
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
||||||
/**
|
/**
|
||||||
* Randomise the size of an ammo stack
|
* Randomise the size of an ammo stack
|
||||||
* @param isPmc is this a PMC
|
* @param isPmc Is ammo on a PMC bot
|
||||||
* @param itemTemplate item details
|
* @param itemTemplate item details from db
|
||||||
* @param ammoItem Ammo stack to randomise
|
* @param ammoItem Ammo item to randomise
|
||||||
*/
|
*/
|
||||||
protected randomiseAmmoStackSize(isPmc: boolean, itemTemplate: ITemplateItem, ammoItem: Item): void;
|
protected randomiseAmmoStackSize(isPmc: boolean, itemTemplate: ITemplateItem, ammoItem: Item): void;
|
||||||
/**
|
/**
|
||||||
|
@ -8,7 +8,7 @@ import { Exit } from "@spt-aki/models/eft/common/ILocationBase";
|
|||||||
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPickup, IRepeatableQuest, IReward, IRewards } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPickup, IRepeatableQuest, IReward, IRewards } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
import { IBaseQuestConfig, IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||||
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
@ -155,7 +155,7 @@ export declare class RepeatableQuestGenerator {
|
|||||||
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
||||||
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
||||||
*/
|
*/
|
||||||
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): IRewards;
|
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IRewards;
|
||||||
/**
|
/**
|
||||||
* Select a number of items that have a colelctive value of the passed in parameter
|
* Select a number of items that have a colelctive value of the passed in parameter
|
||||||
* @param repeatableConfig Config
|
* @param repeatableConfig Config
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Common, HideoutArea, IHideoutImprovement, Production, Productive } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { HideoutArea, IHideoutImprovement, Production, Productive } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea";
|
import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea";
|
||||||
import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
||||||
@ -201,22 +201,10 @@ export declare class HideoutHelper {
|
|||||||
* @returns coin slot count
|
* @returns coin slot count
|
||||||
*/
|
*/
|
||||||
protected getBTCSlots(pmcData: IPmcData): number;
|
protected getBTCSlots(pmcData: IPmcData): 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
|
* Get a count of bitcoins player miner can hold
|
||||||
*/
|
*/
|
||||||
protected getBitcoinMinerContainerSlotSize(): number;
|
protected getBitcoinMinerContainerSlotSize(): number;
|
||||||
/**
|
|
||||||
* Get the hideout management skill from player profile
|
|
||||||
* @param pmcData Profile to look at
|
|
||||||
* @returns Hideout management skill object
|
|
||||||
*/
|
|
||||||
protected getHideoutManagementSkill(pmcData: IPmcData): Common;
|
|
||||||
/**
|
/**
|
||||||
* HideoutManagement skill gives a consumption bonus the higher the level
|
* HideoutManagement skill gives a consumption bonus the higher the level
|
||||||
* 0.5% per level per 1-51, (25.5% at max)
|
* 0.5% per level per 1-51, (25.5% at max)
|
||||||
|
@ -7,6 +7,7 @@ import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService";
|
import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService";
|
||||||
|
import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
|
||||||
import { LocaleService } from "@spt-aki/services/LocaleService";
|
import { LocaleService } from "@spt-aki/services/LocaleService";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
@ -24,10 +25,11 @@ declare class ItemHelper {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected itemBaseClassService: ItemBaseClassService;
|
protected itemBaseClassService: ItemBaseClassService;
|
||||||
|
protected itemFilterService: ItemFilterService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected localeService: LocaleService;
|
protected localeService: LocaleService;
|
||||||
protected readonly defaultInvalidBaseTypes: string[];
|
protected readonly defaultInvalidBaseTypes: string[];
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, localisationService: LocalisationService, localeService: LocaleService);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService);
|
||||||
/**
|
/**
|
||||||
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
||||||
* @param {string} tpl the template id / tpl
|
* @param {string} tpl the template id / tpl
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { CounterKeyValue, Stats } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { Common, CounterKeyValue, Stats } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData";
|
import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData";
|
||||||
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService";
|
import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -19,7 +21,8 @@ export declare class ProfileHelper {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileSnapshotService: ProfileSnapshotService;
|
protected profileSnapshotService: ProfileSnapshotService;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService);
|
protected localisationService: LocalisationService;
|
||||||
|
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService);
|
||||||
/**
|
/**
|
||||||
* Remove/reset a completed quest condtion from players profile quest data
|
* Remove/reset a completed quest condtion from players profile quest data
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -101,4 +104,21 @@ export declare class ProfileHelper {
|
|||||||
* @param keyToIncrement Key
|
* @param keyToIncrement Key
|
||||||
*/
|
*/
|
||||||
incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void;
|
incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void;
|
||||||
|
/**
|
||||||
|
* Check if player has a skill at elite level
|
||||||
|
* @param skillType Skill to check
|
||||||
|
* @param pmcProfile Profile to find skill in
|
||||||
|
* @returns True if player has skill at elite level
|
||||||
|
*/
|
||||||
|
hasEliteSkillLevel(skillType: SkillTypes, pmcProfile: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Add points to a specific skill in player profile
|
||||||
|
* @param skill Skill to add points to
|
||||||
|
* @param pointsToAdd Points to add
|
||||||
|
* @param pmcProfile Player profile with skill
|
||||||
|
* @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
addSkillPointsToPlayer(pmcProfile: IPmcData, skill: SkillTypes, pointsToAdd: number, useSkillProgressRateMultipler?: boolean): void;
|
||||||
|
getSkillFromProfile(pmcData: IPmcData, skill: SkillTypes): Common;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import { QuestConditionHelper } from "@spt-aki/helpers/QuestConditionHelper";
|
|||||||
import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { Common, IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "@spt-aki/models/eft/common/tables/IQuest";
|
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "@spt-aki/models/eft/common/tables/IQuest";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
@ -66,14 +66,12 @@ export declare class QuestHelper {
|
|||||||
*/
|
*/
|
||||||
getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[];
|
getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[];
|
||||||
/**
|
/**
|
||||||
* Increase skill points of a skill on player profile
|
* Adjust skill experience for low skill levels, mimicing the official client
|
||||||
* Dupe of PlayerService.incrementSkillLevel()
|
* @param profileSkill the skill experience is being added to
|
||||||
* @param sessionID Session id
|
* @param progressAmount the amount of experience being added to the skill
|
||||||
* @param pmcData Player profile
|
* @returns the adjusted skill progress gain
|
||||||
* @param skillName Name of skill to increase skill points of
|
|
||||||
* @param progressAmount Amount of skill points to add to skill
|
|
||||||
*/
|
*/
|
||||||
rewardSkillPoints(sessionID: string, pmcData: IPmcData, skillName: string, progressAmount: number): void;
|
adjustSkillExpForLowLevels(profileSkill: Common, progressAmount: number): number;
|
||||||
/**
|
/**
|
||||||
* Get quest name by quest id
|
* Get quest name by quest id
|
||||||
* @param questId id to get
|
* @param questId id to get
|
||||||
|
@ -29,7 +29,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
protected serverDependencies: Record<string, string>;
|
protected serverDependencies: Record<string, string>;
|
||||||
protected skippedMods: string[];
|
protected skippedMods: Set<string>;
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modLoadOrder: ModLoadOrder, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modLoadOrder: ModLoadOrder, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -44,27 +44,22 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected sortMods(prev: string, next: string, missingFromOrderJSON: Record<string, boolean>): number;
|
protected sortMods(prev: string, next: string, missingFromOrderJSON: Record<string, boolean>): number;
|
||||||
/**
|
/**
|
||||||
* Check for duplicate mods loaded, show error if any
|
* Check for duplicate mods loaded, show error if any
|
||||||
* @param modPackageData Dictionary of mod package.json data
|
* @param modPackageData map of mod package.json data
|
||||||
*/
|
*/
|
||||||
protected checkForDuplicateMods(modPackageData: Record<string, IPackageJsonData>): void;
|
protected checkForDuplicateMods(modPackageData: Map<string, IPackageJsonData>): void;
|
||||||
/**
|
/**
|
||||||
* Check for and return duplicate strings inside an array
|
* Returns an array of valid mods.
|
||||||
* @param stringArray Array to check for duplicates
|
*
|
||||||
* @returns string array of duplicates, empty if none found
|
|
||||||
*/
|
|
||||||
protected getDuplicates(stringArray: string[]): string[];
|
|
||||||
/**
|
|
||||||
* Get an array of mods with errors that prevent them from working with SPT
|
|
||||||
* @param mods mods to validate
|
* @param mods mods to validate
|
||||||
* @returns Mod names as array
|
* @returns array of mod folder names
|
||||||
*/
|
*/
|
||||||
protected getBrokenMods(mods: string[]): string[];
|
protected getValidMods(mods: string[]): string[];
|
||||||
/**
|
/**
|
||||||
* Get packageJson data for mods
|
* Get packageJson data for mods
|
||||||
* @param mods mods to get packageJson for
|
* @param mods mods to get packageJson for
|
||||||
* @returns dictionary <modName - package.json>
|
* @returns map <modFolderName - package.json>
|
||||||
*/
|
*/
|
||||||
protected getModsPackageData(mods: string[]): Record<string, IPackageJsonData>;
|
protected getModsPackageData(mods: string[]): Map<string, IPackageJsonData>;
|
||||||
/**
|
/**
|
||||||
* Is the passed in mod compatible with the running server version
|
* Is the passed in mod compatible with the running server version
|
||||||
* @param mod Mod to check compatibiltiy with AKI
|
* @param mod Mod to check compatibiltiy with AKI
|
||||||
@ -86,10 +81,17 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
* Compile mod and add into class property "imported"
|
* Compile mod and add into class property "imported"
|
||||||
* @param mod Name of mod to compile/add
|
* @param mod Name of mod to compile/add
|
||||||
*/
|
*/
|
||||||
protected addModAsync(mod: string): Promise<void>;
|
protected addModAsync(mod: string, pkg: IPackageJsonData): Promise<void>;
|
||||||
|
/**
|
||||||
|
* Checks if a given mod should be loaded or skipped.
|
||||||
|
*
|
||||||
|
* @param pkg mod package.json data
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected shouldSkipMod(pkg: IPackageJsonData): boolean;
|
||||||
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Map<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Map<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
* Validate a mod passes a number of checks
|
* Validate a mod passes a number of checks
|
||||||
* @param modName name of mod in /mods/ to validate
|
* @param modName name of mod in /mods/ to validate
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
export declare enum SkillTypes {
|
export declare enum SkillTypes {
|
||||||
|
BOT_RELOAD = "BotReload",
|
||||||
|
BOT_SOUND = "BotSound",
|
||||||
HIDEOUT_MANAGEMENT = "HideoutManagement",
|
HIDEOUT_MANAGEMENT = "HideoutManagement",
|
||||||
CRAFTING = "Crafting",
|
CRAFTING = "Crafting",
|
||||||
METABOLISM = "Metabolism",
|
METABOLISM = "Metabolism",
|
||||||
@ -19,6 +21,7 @@ export declare enum SkillTypes {
|
|||||||
ATTENTION = "Attention",
|
ATTENTION = "Attention",
|
||||||
CHARISMA = "Charisma",
|
CHARISMA = "Charisma",
|
||||||
MEMORY = "Memory",
|
MEMORY = "Memory",
|
||||||
|
MELEE = "Melee",
|
||||||
SURGERY = "Surgery",
|
SURGERY = "Surgery",
|
||||||
AIM_DRILLS = "AimDrills",
|
AIM_DRILLS = "AimDrills",
|
||||||
TROUBLESHOOTING = "TroubleShooting",
|
TROUBLESHOOTING = "TroubleShooting",
|
||||||
@ -31,6 +34,7 @@ export declare enum SkillTypes {
|
|||||||
NIGHT_OPS = "NightOps",
|
NIGHT_OPS = "NightOps",
|
||||||
SILENT_OPS = "SilentOps",
|
SILENT_OPS = "SilentOps",
|
||||||
LOCKPICKING = "Lockpicking",
|
LOCKPICKING = "Lockpicking",
|
||||||
|
/** Also called Weapon Maintenance*/
|
||||||
WEAPON_TREATMENT = "WeaponTreatment",
|
WEAPON_TREATMENT = "WeaponTreatment",
|
||||||
MAG_DRILLS = "MagDrills",
|
MAG_DRILLS = "MagDrills",
|
||||||
FREE_TRADING = "Freetrading",
|
FREE_TRADING = "Freetrading",
|
||||||
|
@ -102,6 +102,8 @@ export interface EquipmentFilters {
|
|||||||
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||||
/** Same as weightingAdjustments but based on player level instead of bot level */
|
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||||
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||||
|
/** Should the stock mod be forced to spawn on bot */
|
||||||
|
forceStock: boolean;
|
||||||
}
|
}
|
||||||
export interface ModLimits {
|
export interface ModLimits {
|
||||||
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
||||||
|
@ -55,6 +55,8 @@ export interface IRewardScaling {
|
|||||||
items: number[];
|
items: number[];
|
||||||
reputation: number[];
|
reputation: number[];
|
||||||
rewardSpread: number;
|
rewardSpread: number;
|
||||||
|
skillRewardChance: number[];
|
||||||
|
skillPointReward: number[];
|
||||||
}
|
}
|
||||||
export interface ITraderWhitelist {
|
export interface ITraderWhitelist {
|
||||||
traderId: string;
|
traderId: string;
|
||||||
@ -66,7 +68,7 @@ export interface IRepeatableQuestTypesConfig {
|
|||||||
Pickup: IPickup;
|
Pickup: IPickup;
|
||||||
Elimination: IEliminationConfig[];
|
Elimination: IEliminationConfig[];
|
||||||
}
|
}
|
||||||
export interface IExploration {
|
export interface IExploration extends IBaseQuestConfig {
|
||||||
maxExtracts: number;
|
maxExtracts: number;
|
||||||
specificExits: ISpecificExits;
|
specificExits: ISpecificExits;
|
||||||
}
|
}
|
||||||
@ -74,7 +76,7 @@ export interface ISpecificExits {
|
|||||||
probability: number;
|
probability: number;
|
||||||
passageRequirementWhitelist: string[];
|
passageRequirementWhitelist: string[];
|
||||||
}
|
}
|
||||||
export interface ICompletion {
|
export interface ICompletion extends IBaseQuestConfig {
|
||||||
minRequestedAmount: number;
|
minRequestedAmount: number;
|
||||||
maxRequestedAmount: number;
|
maxRequestedAmount: number;
|
||||||
minRequestedBulletAmount: number;
|
minRequestedBulletAmount: number;
|
||||||
@ -82,7 +84,7 @@ export interface ICompletion {
|
|||||||
useWhitelist: boolean;
|
useWhitelist: boolean;
|
||||||
useBlacklist: boolean;
|
useBlacklist: boolean;
|
||||||
}
|
}
|
||||||
export interface IPickup {
|
export interface IPickup extends IBaseQuestConfig {
|
||||||
ItemTypeToFetchWithMaxCount: IPickupTypeWithMaxCount[];
|
ItemTypeToFetchWithMaxCount: IPickupTypeWithMaxCount[];
|
||||||
}
|
}
|
||||||
export interface IPickupTypeWithMaxCount {
|
export interface IPickupTypeWithMaxCount {
|
||||||
@ -90,7 +92,7 @@ export interface IPickupTypeWithMaxCount {
|
|||||||
maxPickupCount: number;
|
maxPickupCount: number;
|
||||||
minPickupCount: number;
|
minPickupCount: number;
|
||||||
}
|
}
|
||||||
export interface IEliminationConfig {
|
export interface IEliminationConfig extends IBaseQuestConfig {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
targets: ITarget[];
|
targets: ITarget[];
|
||||||
bodyPartProb: number;
|
bodyPartProb: number;
|
||||||
@ -111,6 +113,9 @@ export interface IEliminationConfig {
|
|||||||
weaponRequirementProb: number;
|
weaponRequirementProb: number;
|
||||||
weaponRequirements: IWeaponRequirement[];
|
weaponRequirements: IWeaponRequirement[];
|
||||||
}
|
}
|
||||||
|
export interface IBaseQuestConfig {
|
||||||
|
possibleSkillRewards: string[];
|
||||||
|
}
|
||||||
export interface ITarget extends IProbabilityObject {
|
export interface ITarget extends IProbabilityObject {
|
||||||
data: IBossInfo;
|
data: IBossInfo;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ export interface IRepairConfig extends IBaseConfig {
|
|||||||
/** INT gain multiplier per repaired item type */
|
/** INT gain multiplier per repaired item type */
|
||||||
repairKitIntellectGainMultiplier: IIntellectGainValues;
|
repairKitIntellectGainMultiplier: IIntellectGainValues;
|
||||||
maxIntellectGainPerRepair: IMaxIntellectGainValues;
|
maxIntellectGainPerRepair: IMaxIntellectGainValues;
|
||||||
|
weaponTreatment: IWeaponTreatmentRepairValues;
|
||||||
repairKit: RepairKit;
|
repairKit: RepairKit;
|
||||||
}
|
}
|
||||||
export interface IIntellectGainValues {
|
export interface IIntellectGainValues {
|
||||||
@ -19,6 +20,16 @@ export interface IMaxIntellectGainValues {
|
|||||||
kit: number;
|
kit: number;
|
||||||
trader: number;
|
trader: number;
|
||||||
}
|
}
|
||||||
|
export interface IWeaponTreatmentRepairValues {
|
||||||
|
/** The chance to gain more weapon maintenance skill */
|
||||||
|
critSuccessChance: number;
|
||||||
|
critSuccessAmount: number;
|
||||||
|
/** The chance to gain less weapon maintenance skill */
|
||||||
|
critFailureChance: number;
|
||||||
|
critFailureAmount: number;
|
||||||
|
/** The multiplier used for calculating weapon maintenance XP */
|
||||||
|
pointGainMultiplier: number;
|
||||||
|
}
|
||||||
export interface RepairKit {
|
export interface RepairKit {
|
||||||
armor: BonusSettings;
|
armor: BonusSettings;
|
||||||
weapon: BonusSettings;
|
weapon: BonusSettings;
|
||||||
|
@ -9,15 +9,6 @@ export declare class PlayerService {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
||||||
/**
|
|
||||||
* 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, useSkillProgressRateMultipler?: boolean): void;
|
|
||||||
/**
|
/**
|
||||||
* Get level of player
|
* Get level of player
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { QuestHelper } from "@spt-aki/helpers/QuestHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { RepairHelper } from "@spt-aki/helpers/RepairHelper";
|
import { RepairHelper } from "@spt-aki/helpers/RepairHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
@ -9,6 +9,7 @@ import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
|||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { RepairKitsInfo } from "@spt-aki/models/eft/repair/IRepairActionDataRequest";
|
import { RepairKitsInfo } from "@spt-aki/models/eft/repair/IRepairActionDataRequest";
|
||||||
import { RepairItem } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest";
|
import { RepairItem } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest";
|
||||||
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
import { BonusSettings, IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig";
|
import { BonusSettings, IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
@ -19,7 +20,7 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
|||||||
export declare class RepairService {
|
export declare class RepairService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected questHelper: QuestHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
@ -29,7 +30,7 @@ export declare class RepairService {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected repairConfig: IRepairConfig;
|
protected repairConfig: IRepairConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, profileHelper: ProfileHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Use trader to repair an items durability
|
* Use trader to repair an items durability
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -56,6 +57,12 @@ export declare class RepairService {
|
|||||||
* @param pmcData Profile to add points to
|
* @param pmcData Profile to add points to
|
||||||
*/
|
*/
|
||||||
addRepairSkillPoints(sessionId: string, repairDetails: RepairDetails, pmcData: IPmcData): void;
|
addRepairSkillPoints(sessionId: string, repairDetails: RepairDetails, pmcData: IPmcData): void;
|
||||||
|
/**
|
||||||
|
* Return an appromixation of the amount of skill points live would return for the given repairDetails
|
||||||
|
* @param repairDetails the repair details to calculate skill points for
|
||||||
|
* @returns the number of skill points to reward the user
|
||||||
|
*/
|
||||||
|
protected getWeaponRepairSkillPoints(repairDetails: RepairDetails): number;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -81,6 +88,13 @@ export declare class RepairService {
|
|||||||
* @returns Multiplier value
|
* @returns Multiplier value
|
||||||
*/
|
*/
|
||||||
protected getBonusMultiplierValue(skillBonusName: string, pmcData: IPmcData): number;
|
protected getBonusMultiplierValue(skillBonusName: string, pmcData: IPmcData): number;
|
||||||
|
/**
|
||||||
|
* Should a repair kit apply total durability loss on repair
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param applyRandomizeDurabilityLoss Value from repair config
|
||||||
|
* @returns True if loss should be applied
|
||||||
|
*/
|
||||||
|
protected shouldRepairKitApplyDurabilityLoss(pmcData: IPmcData, applyRandomizeDurabilityLoss: boolean): boolean;
|
||||||
/**
|
/**
|
||||||
* Update repair kits Resource object if it doesn't exist
|
* Update repair kits Resource object if it doesn't exist
|
||||||
* @param repairKitDetails Repair kit details from db
|
* @param repairKitDetails Repair kit details from db
|
||||||
@ -112,7 +126,7 @@ export declare class RepairService {
|
|||||||
* @param itemTemplate Item to check for skill
|
* @param itemTemplate Item to check for skill
|
||||||
* @returns Skill name
|
* @returns Skill name
|
||||||
*/
|
*/
|
||||||
protected getItemSkillType(itemTemplate: ITemplateItem): string;
|
protected getItemSkillType(itemTemplate: ITemplateItem): SkillTypes;
|
||||||
/**
|
/**
|
||||||
* Ensure multiplier is between 1 and 0.01
|
* Ensure multiplier is between 1 and 0.01
|
||||||
* @param receiveDurabilityMaxPercent Max durabiltiy percent
|
* @param receiveDurabilityMaxPercent Max durabiltiy percent
|
||||||
@ -123,6 +137,7 @@ export declare class RepairService {
|
|||||||
}
|
}
|
||||||
export declare class RepairDetails {
|
export declare class RepairDetails {
|
||||||
repairCost?: number;
|
repairCost?: number;
|
||||||
|
repairPoints?: number;
|
||||||
repairedItem: Item;
|
repairedItem: Item;
|
||||||
repairedItemIsArmor: boolean;
|
repairedItemIsArmor: boolean;
|
||||||
repairAmount: number;
|
repairAmount: number;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { OnLoad } from "@spt-aki/di/OnLoad";
|
import { OnLoad } from "@spt-aki/di/OnLoad";
|
||||||
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
||||||
|
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { EncodingUtil } from "@spt-aki/utils/EncodingUtil";
|
import { EncodingUtil } from "@spt-aki/utils/EncodingUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -8,11 +10,13 @@ export declare class App {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
protected encodingUtil: EncodingUtil;
|
protected encodingUtil: EncodingUtil;
|
||||||
protected onLoadComponents: OnLoad[];
|
protected onLoadComponents: OnLoad[];
|
||||||
protected onUpdateComponents: OnUpdate[];
|
protected onUpdateComponents: OnUpdate[];
|
||||||
protected onUpdateLastRun: {};
|
protected onUpdateLastRun: {};
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, encodingUtil: EncodingUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]);
|
protected coreConfig: ICoreConfig;
|
||||||
|
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, configServer: ConfigServer, encodingUtil: EncodingUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]);
|
||||||
load(): Promise<void>;
|
load(): Promise<void>;
|
||||||
protected update(onUpdateComponents: OnUpdate[]): Promise<void>;
|
protected update(onUpdateComponents: OnUpdate[]): Promise<void>;
|
||||||
protected logUpdateException(err: any, updateable: OnUpdate): void;
|
protected logUpdateException(err: any, updateable: OnUpdate): void;
|
||||||
|
@ -61,6 +61,10 @@ export declare class GameController {
|
|||||||
* Handle client/game/start
|
* Handle client/game/start
|
||||||
*/
|
*/
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||||
|
/**
|
||||||
|
* Out of date/incorrectly made trader mods forget this data
|
||||||
|
*/
|
||||||
|
protected checkTraderRepairValuesExist(): void;
|
||||||
protected addCustomLooseLootPositions(): void;
|
protected addCustomLooseLootPositions(): void;
|
||||||
protected adjustLooseLootSpawnProbabilities(): void;
|
protected adjustLooseLootSpawnProbabilities(): void;
|
||||||
protected setHideoutAreasAndCraftsTo40Secs(): void;
|
protected setHideoutAreasAndCraftsTo40Secs(): void;
|
||||||
|
@ -8,7 +8,7 @@ import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGet
|
|||||||
import { IGetInsuranceCostResponseData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostResponseData";
|
import { IGetInsuranceCostResponseData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostResponseData";
|
||||||
import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData";
|
import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { Insurance, ISystemData } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { ISystemData, Insurance } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
|
@ -13,6 +13,7 @@ import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||||
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
@ -21,8 +22,9 @@ import { ObjectId } from "@spt-aki/utils/ObjectId";
|
|||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
export declare class RepeatableQuestController {
|
export declare class RepeatableQuestController {
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
@ -37,7 +39,7 @@ export declare class RepeatableQuestController {
|
|||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Handle client/repeatalbeQuests/activityPeriods
|
* Handle client/repeatalbeQuests/activityPeriods
|
||||||
* Returns an array of objects in the format of repeatable quests to the client.
|
* Returns an array of objects in the format of repeatable quests to the client.
|
||||||
@ -64,6 +66,13 @@ export declare class RepeatableQuestController {
|
|||||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
|
/**
|
||||||
|
* Get the number of quests to generate - takes into account charisma state of player
|
||||||
|
* @param repeatableConfig Config
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @returns Quest count
|
||||||
|
*/
|
||||||
|
protected getQuestCount(repeatableConfig: IRepeatableQuestConfig, pmcData: IPmcData): number;
|
||||||
/**
|
/**
|
||||||
* Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
|
* Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
|
||||||
* @param repeatableConfig daily/weekly config
|
* @param repeatableConfig daily/weekly config
|
||||||
|
@ -179,7 +179,7 @@ export declare class BotEquipmentModGenerator {
|
|||||||
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
||||||
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
||||||
* @param items The items where the CylinderMagazine's camora are appended to
|
* @param items The items where the CylinderMagazine's camora are appended to
|
||||||
* @param modPool modPool which should include available cartrigdes
|
* @param modPool modPool which should include available cartridges
|
||||||
* @param parentId The CylinderMagazine's UID
|
* @param parentId The CylinderMagazine's UID
|
||||||
* @param parentTemplate The CylinderMagazine's template
|
* @param parentTemplate The CylinderMagazine's template
|
||||||
*/
|
*/
|
||||||
|
@ -83,7 +83,7 @@ export declare class BotLootGenerator {
|
|||||||
* @param equipmentSlot slot to place the preset in (backpack)
|
* @param equipmentSlot slot to place the preset in (backpack)
|
||||||
* @param templateInventory bots template, assault.json
|
* @param templateInventory bots template, assault.json
|
||||||
* @param modChances chances for mods to spawn on weapon
|
* @param modChances chances for mods to spawn on weapon
|
||||||
* @param botRole bots role, .e.g. pmcBot
|
* @param botRole bots role .e.g. pmcBot
|
||||||
* @param isPmc are we generating for a pmc
|
* @param isPmc are we generating for a pmc
|
||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
@ -120,16 +120,16 @@ export declare class BotLootGenerator {
|
|||||||
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
||||||
/**
|
/**
|
||||||
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
||||||
* @param isPmc is this a PMC
|
* @param isPmc Is money on a PMC bot
|
||||||
* @param itemTemplate item details
|
* @param itemTemplate item details from db
|
||||||
* @param moneyItem Money stack to randomise
|
* @param moneyItem Money item to randomise
|
||||||
*/
|
*/
|
||||||
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
||||||
/**
|
/**
|
||||||
* Randomise the size of an ammo stack
|
* Randomise the size of an ammo stack
|
||||||
* @param isPmc is this a PMC
|
* @param isPmc Is ammo on a PMC bot
|
||||||
* @param itemTemplate item details
|
* @param itemTemplate item details from db
|
||||||
* @param ammoItem Ammo stack to randomise
|
* @param ammoItem Ammo item to randomise
|
||||||
*/
|
*/
|
||||||
protected randomiseAmmoStackSize(isPmc: boolean, itemTemplate: ITemplateItem, ammoItem: Item): void;
|
protected randomiseAmmoStackSize(isPmc: boolean, itemTemplate: ITemplateItem, ammoItem: Item): void;
|
||||||
/**
|
/**
|
||||||
|
@ -8,7 +8,7 @@ import { Exit } from "@spt-aki/models/eft/common/ILocationBase";
|
|||||||
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPickup, IRepeatableQuest, IReward, IRewards } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPickup, IRepeatableQuest, IReward, IRewards } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
import { IBaseQuestConfig, IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||||
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
@ -155,7 +155,7 @@ export declare class RepeatableQuestGenerator {
|
|||||||
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
||||||
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
||||||
*/
|
*/
|
||||||
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): IRewards;
|
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IRewards;
|
||||||
/**
|
/**
|
||||||
* Select a number of items that have a colelctive value of the passed in parameter
|
* Select a number of items that have a colelctive value of the passed in parameter
|
||||||
* @param repeatableConfig Config
|
* @param repeatableConfig Config
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Common, HideoutArea, IHideoutImprovement, Production, Productive } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { HideoutArea, IHideoutImprovement, Production, Productive } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea";
|
import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea";
|
||||||
import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
||||||
@ -201,22 +201,10 @@ export declare class HideoutHelper {
|
|||||||
* @returns coin slot count
|
* @returns coin slot count
|
||||||
*/
|
*/
|
||||||
protected getBTCSlots(pmcData: IPmcData): number;
|
protected getBTCSlots(pmcData: IPmcData): 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
|
* Get a count of bitcoins player miner can hold
|
||||||
*/
|
*/
|
||||||
protected getBitcoinMinerContainerSlotSize(): number;
|
protected getBitcoinMinerContainerSlotSize(): number;
|
||||||
/**
|
|
||||||
* Get the hideout management skill from player profile
|
|
||||||
* @param pmcData Profile to look at
|
|
||||||
* @returns Hideout management skill object
|
|
||||||
*/
|
|
||||||
protected getHideoutManagementSkill(pmcData: IPmcData): Common;
|
|
||||||
/**
|
/**
|
||||||
* HideoutManagement skill gives a consumption bonus the higher the level
|
* HideoutManagement skill gives a consumption bonus the higher the level
|
||||||
* 0.5% per level per 1-51, (25.5% at max)
|
* 0.5% per level per 1-51, (25.5% at max)
|
||||||
|
@ -7,6 +7,7 @@ import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService";
|
import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService";
|
||||||
|
import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
|
||||||
import { LocaleService } from "@spt-aki/services/LocaleService";
|
import { LocaleService } from "@spt-aki/services/LocaleService";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
@ -24,10 +25,11 @@ declare class ItemHelper {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected itemBaseClassService: ItemBaseClassService;
|
protected itemBaseClassService: ItemBaseClassService;
|
||||||
|
protected itemFilterService: ItemFilterService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected localeService: LocaleService;
|
protected localeService: LocaleService;
|
||||||
protected readonly defaultInvalidBaseTypes: string[];
|
protected readonly defaultInvalidBaseTypes: string[];
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, localisationService: LocalisationService, localeService: LocaleService);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService);
|
||||||
/**
|
/**
|
||||||
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
||||||
* @param {string} tpl the template id / tpl
|
* @param {string} tpl the template id / tpl
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { CounterKeyValue, Stats } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { Common, CounterKeyValue, Stats } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData";
|
import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData";
|
||||||
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService";
|
import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -19,7 +21,8 @@ export declare class ProfileHelper {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileSnapshotService: ProfileSnapshotService;
|
protected profileSnapshotService: ProfileSnapshotService;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService);
|
protected localisationService: LocalisationService;
|
||||||
|
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService);
|
||||||
/**
|
/**
|
||||||
* Remove/reset a completed quest condtion from players profile quest data
|
* Remove/reset a completed quest condtion from players profile quest data
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -101,4 +104,21 @@ export declare class ProfileHelper {
|
|||||||
* @param keyToIncrement Key
|
* @param keyToIncrement Key
|
||||||
*/
|
*/
|
||||||
incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void;
|
incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void;
|
||||||
|
/**
|
||||||
|
* Check if player has a skill at elite level
|
||||||
|
* @param skillType Skill to check
|
||||||
|
* @param pmcProfile Profile to find skill in
|
||||||
|
* @returns True if player has skill at elite level
|
||||||
|
*/
|
||||||
|
hasEliteSkillLevel(skillType: SkillTypes, pmcProfile: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Add points to a specific skill in player profile
|
||||||
|
* @param skill Skill to add points to
|
||||||
|
* @param pointsToAdd Points to add
|
||||||
|
* @param pmcProfile Player profile with skill
|
||||||
|
* @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
addSkillPointsToPlayer(pmcProfile: IPmcData, skill: SkillTypes, pointsToAdd: number, useSkillProgressRateMultipler?: boolean): void;
|
||||||
|
getSkillFromProfile(pmcData: IPmcData, skill: SkillTypes): Common;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import { QuestConditionHelper } from "@spt-aki/helpers/QuestConditionHelper";
|
|||||||
import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { Common, IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "@spt-aki/models/eft/common/tables/IQuest";
|
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "@spt-aki/models/eft/common/tables/IQuest";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
@ -66,14 +66,12 @@ export declare class QuestHelper {
|
|||||||
*/
|
*/
|
||||||
getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[];
|
getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[];
|
||||||
/**
|
/**
|
||||||
* Increase skill points of a skill on player profile
|
* Adjust skill experience for low skill levels, mimicing the official client
|
||||||
* Dupe of PlayerService.incrementSkillLevel()
|
* @param profileSkill the skill experience is being added to
|
||||||
* @param sessionID Session id
|
* @param progressAmount the amount of experience being added to the skill
|
||||||
* @param pmcData Player profile
|
* @returns the adjusted skill progress gain
|
||||||
* @param skillName Name of skill to increase skill points of
|
|
||||||
* @param progressAmount Amount of skill points to add to skill
|
|
||||||
*/
|
*/
|
||||||
rewardSkillPoints(sessionID: string, pmcData: IPmcData, skillName: string, progressAmount: number): void;
|
adjustSkillExpForLowLevels(profileSkill: Common, progressAmount: number): number;
|
||||||
/**
|
/**
|
||||||
* Get quest name by quest id
|
* Get quest name by quest id
|
||||||
* @param questId id to get
|
* @param questId id to get
|
||||||
|
@ -29,7 +29,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
protected serverDependencies: Record<string, string>;
|
protected serverDependencies: Record<string, string>;
|
||||||
protected skippedMods: string[];
|
protected skippedMods: Set<string>;
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modLoadOrder: ModLoadOrder, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modLoadOrder: ModLoadOrder, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -44,27 +44,22 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected sortMods(prev: string, next: string, missingFromOrderJSON: Record<string, boolean>): number;
|
protected sortMods(prev: string, next: string, missingFromOrderJSON: Record<string, boolean>): number;
|
||||||
/**
|
/**
|
||||||
* Check for duplicate mods loaded, show error if any
|
* Check for duplicate mods loaded, show error if any
|
||||||
* @param modPackageData Dictionary of mod package.json data
|
* @param modPackageData map of mod package.json data
|
||||||
*/
|
*/
|
||||||
protected checkForDuplicateMods(modPackageData: Record<string, IPackageJsonData>): void;
|
protected checkForDuplicateMods(modPackageData: Map<string, IPackageJsonData>): void;
|
||||||
/**
|
/**
|
||||||
* Check for and return duplicate strings inside an array
|
* Returns an array of valid mods.
|
||||||
* @param stringArray Array to check for duplicates
|
*
|
||||||
* @returns string array of duplicates, empty if none found
|
|
||||||
*/
|
|
||||||
protected getDuplicates(stringArray: string[]): string[];
|
|
||||||
/**
|
|
||||||
* Get an array of mods with errors that prevent them from working with SPT
|
|
||||||
* @param mods mods to validate
|
* @param mods mods to validate
|
||||||
* @returns Mod names as array
|
* @returns array of mod folder names
|
||||||
*/
|
*/
|
||||||
protected getBrokenMods(mods: string[]): string[];
|
protected getValidMods(mods: string[]): string[];
|
||||||
/**
|
/**
|
||||||
* Get packageJson data for mods
|
* Get packageJson data for mods
|
||||||
* @param mods mods to get packageJson for
|
* @param mods mods to get packageJson for
|
||||||
* @returns dictionary <modName - package.json>
|
* @returns map <modFolderName - package.json>
|
||||||
*/
|
*/
|
||||||
protected getModsPackageData(mods: string[]): Record<string, IPackageJsonData>;
|
protected getModsPackageData(mods: string[]): Map<string, IPackageJsonData>;
|
||||||
/**
|
/**
|
||||||
* Is the passed in mod compatible with the running server version
|
* Is the passed in mod compatible with the running server version
|
||||||
* @param mod Mod to check compatibiltiy with AKI
|
* @param mod Mod to check compatibiltiy with AKI
|
||||||
@ -86,10 +81,17 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
* Compile mod and add into class property "imported"
|
* Compile mod and add into class property "imported"
|
||||||
* @param mod Name of mod to compile/add
|
* @param mod Name of mod to compile/add
|
||||||
*/
|
*/
|
||||||
protected addModAsync(mod: string): Promise<void>;
|
protected addModAsync(mod: string, pkg: IPackageJsonData): Promise<void>;
|
||||||
|
/**
|
||||||
|
* Checks if a given mod should be loaded or skipped.
|
||||||
|
*
|
||||||
|
* @param pkg mod package.json data
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected shouldSkipMod(pkg: IPackageJsonData): boolean;
|
||||||
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Map<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Map<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
* Validate a mod passes a number of checks
|
* Validate a mod passes a number of checks
|
||||||
* @param modName name of mod in /mods/ to validate
|
* @param modName name of mod in /mods/ to validate
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
export declare enum SkillTypes {
|
export declare enum SkillTypes {
|
||||||
|
BOT_RELOAD = "BotReload",
|
||||||
|
BOT_SOUND = "BotSound",
|
||||||
HIDEOUT_MANAGEMENT = "HideoutManagement",
|
HIDEOUT_MANAGEMENT = "HideoutManagement",
|
||||||
CRAFTING = "Crafting",
|
CRAFTING = "Crafting",
|
||||||
METABOLISM = "Metabolism",
|
METABOLISM = "Metabolism",
|
||||||
@ -19,6 +21,7 @@ export declare enum SkillTypes {
|
|||||||
ATTENTION = "Attention",
|
ATTENTION = "Attention",
|
||||||
CHARISMA = "Charisma",
|
CHARISMA = "Charisma",
|
||||||
MEMORY = "Memory",
|
MEMORY = "Memory",
|
||||||
|
MELEE = "Melee",
|
||||||
SURGERY = "Surgery",
|
SURGERY = "Surgery",
|
||||||
AIM_DRILLS = "AimDrills",
|
AIM_DRILLS = "AimDrills",
|
||||||
TROUBLESHOOTING = "TroubleShooting",
|
TROUBLESHOOTING = "TroubleShooting",
|
||||||
@ -31,6 +34,7 @@ export declare enum SkillTypes {
|
|||||||
NIGHT_OPS = "NightOps",
|
NIGHT_OPS = "NightOps",
|
||||||
SILENT_OPS = "SilentOps",
|
SILENT_OPS = "SilentOps",
|
||||||
LOCKPICKING = "Lockpicking",
|
LOCKPICKING = "Lockpicking",
|
||||||
|
/** Also called Weapon Maintenance*/
|
||||||
WEAPON_TREATMENT = "WeaponTreatment",
|
WEAPON_TREATMENT = "WeaponTreatment",
|
||||||
MAG_DRILLS = "MagDrills",
|
MAG_DRILLS = "MagDrills",
|
||||||
FREE_TRADING = "Freetrading",
|
FREE_TRADING = "Freetrading",
|
||||||
|
@ -102,6 +102,8 @@ export interface EquipmentFilters {
|
|||||||
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||||
/** Same as weightingAdjustments but based on player level instead of bot level */
|
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||||
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||||
|
/** Should the stock mod be forced to spawn on bot */
|
||||||
|
forceStock: boolean;
|
||||||
}
|
}
|
||||||
export interface ModLimits {
|
export interface ModLimits {
|
||||||
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
||||||
|
@ -55,6 +55,8 @@ export interface IRewardScaling {
|
|||||||
items: number[];
|
items: number[];
|
||||||
reputation: number[];
|
reputation: number[];
|
||||||
rewardSpread: number;
|
rewardSpread: number;
|
||||||
|
skillRewardChance: number[];
|
||||||
|
skillPointReward: number[];
|
||||||
}
|
}
|
||||||
export interface ITraderWhitelist {
|
export interface ITraderWhitelist {
|
||||||
traderId: string;
|
traderId: string;
|
||||||
@ -66,7 +68,7 @@ export interface IRepeatableQuestTypesConfig {
|
|||||||
Pickup: IPickup;
|
Pickup: IPickup;
|
||||||
Elimination: IEliminationConfig[];
|
Elimination: IEliminationConfig[];
|
||||||
}
|
}
|
||||||
export interface IExploration {
|
export interface IExploration extends IBaseQuestConfig {
|
||||||
maxExtracts: number;
|
maxExtracts: number;
|
||||||
specificExits: ISpecificExits;
|
specificExits: ISpecificExits;
|
||||||
}
|
}
|
||||||
@ -74,7 +76,7 @@ export interface ISpecificExits {
|
|||||||
probability: number;
|
probability: number;
|
||||||
passageRequirementWhitelist: string[];
|
passageRequirementWhitelist: string[];
|
||||||
}
|
}
|
||||||
export interface ICompletion {
|
export interface ICompletion extends IBaseQuestConfig {
|
||||||
minRequestedAmount: number;
|
minRequestedAmount: number;
|
||||||
maxRequestedAmount: number;
|
maxRequestedAmount: number;
|
||||||
minRequestedBulletAmount: number;
|
minRequestedBulletAmount: number;
|
||||||
@ -82,7 +84,7 @@ export interface ICompletion {
|
|||||||
useWhitelist: boolean;
|
useWhitelist: boolean;
|
||||||
useBlacklist: boolean;
|
useBlacklist: boolean;
|
||||||
}
|
}
|
||||||
export interface IPickup {
|
export interface IPickup extends IBaseQuestConfig {
|
||||||
ItemTypeToFetchWithMaxCount: IPickupTypeWithMaxCount[];
|
ItemTypeToFetchWithMaxCount: IPickupTypeWithMaxCount[];
|
||||||
}
|
}
|
||||||
export interface IPickupTypeWithMaxCount {
|
export interface IPickupTypeWithMaxCount {
|
||||||
@ -90,7 +92,7 @@ export interface IPickupTypeWithMaxCount {
|
|||||||
maxPickupCount: number;
|
maxPickupCount: number;
|
||||||
minPickupCount: number;
|
minPickupCount: number;
|
||||||
}
|
}
|
||||||
export interface IEliminationConfig {
|
export interface IEliminationConfig extends IBaseQuestConfig {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
targets: ITarget[];
|
targets: ITarget[];
|
||||||
bodyPartProb: number;
|
bodyPartProb: number;
|
||||||
@ -111,6 +113,9 @@ export interface IEliminationConfig {
|
|||||||
weaponRequirementProb: number;
|
weaponRequirementProb: number;
|
||||||
weaponRequirements: IWeaponRequirement[];
|
weaponRequirements: IWeaponRequirement[];
|
||||||
}
|
}
|
||||||
|
export interface IBaseQuestConfig {
|
||||||
|
possibleSkillRewards: string[];
|
||||||
|
}
|
||||||
export interface ITarget extends IProbabilityObject {
|
export interface ITarget extends IProbabilityObject {
|
||||||
data: IBossInfo;
|
data: IBossInfo;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ export interface IRepairConfig extends IBaseConfig {
|
|||||||
/** INT gain multiplier per repaired item type */
|
/** INT gain multiplier per repaired item type */
|
||||||
repairKitIntellectGainMultiplier: IIntellectGainValues;
|
repairKitIntellectGainMultiplier: IIntellectGainValues;
|
||||||
maxIntellectGainPerRepair: IMaxIntellectGainValues;
|
maxIntellectGainPerRepair: IMaxIntellectGainValues;
|
||||||
|
weaponTreatment: IWeaponTreatmentRepairValues;
|
||||||
repairKit: RepairKit;
|
repairKit: RepairKit;
|
||||||
}
|
}
|
||||||
export interface IIntellectGainValues {
|
export interface IIntellectGainValues {
|
||||||
@ -19,6 +20,16 @@ export interface IMaxIntellectGainValues {
|
|||||||
kit: number;
|
kit: number;
|
||||||
trader: number;
|
trader: number;
|
||||||
}
|
}
|
||||||
|
export interface IWeaponTreatmentRepairValues {
|
||||||
|
/** The chance to gain more weapon maintenance skill */
|
||||||
|
critSuccessChance: number;
|
||||||
|
critSuccessAmount: number;
|
||||||
|
/** The chance to gain less weapon maintenance skill */
|
||||||
|
critFailureChance: number;
|
||||||
|
critFailureAmount: number;
|
||||||
|
/** The multiplier used for calculating weapon maintenance XP */
|
||||||
|
pointGainMultiplier: number;
|
||||||
|
}
|
||||||
export interface RepairKit {
|
export interface RepairKit {
|
||||||
armor: BonusSettings;
|
armor: BonusSettings;
|
||||||
weapon: BonusSettings;
|
weapon: BonusSettings;
|
||||||
|
@ -9,15 +9,6 @@ export declare class PlayerService {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
||||||
/**
|
|
||||||
* 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, useSkillProgressRateMultipler?: boolean): void;
|
|
||||||
/**
|
/**
|
||||||
* Get level of player
|
* Get level of player
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { QuestHelper } from "@spt-aki/helpers/QuestHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { RepairHelper } from "@spt-aki/helpers/RepairHelper";
|
import { RepairHelper } from "@spt-aki/helpers/RepairHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
@ -9,6 +9,7 @@ import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
|||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { RepairKitsInfo } from "@spt-aki/models/eft/repair/IRepairActionDataRequest";
|
import { RepairKitsInfo } from "@spt-aki/models/eft/repair/IRepairActionDataRequest";
|
||||||
import { RepairItem } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest";
|
import { RepairItem } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest";
|
||||||
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
import { BonusSettings, IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig";
|
import { BonusSettings, IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
@ -19,7 +20,7 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
|||||||
export declare class RepairService {
|
export declare class RepairService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected questHelper: QuestHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
@ -29,7 +30,7 @@ export declare class RepairService {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected repairConfig: IRepairConfig;
|
protected repairConfig: IRepairConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, profileHelper: ProfileHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Use trader to repair an items durability
|
* Use trader to repair an items durability
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -56,6 +57,12 @@ export declare class RepairService {
|
|||||||
* @param pmcData Profile to add points to
|
* @param pmcData Profile to add points to
|
||||||
*/
|
*/
|
||||||
addRepairSkillPoints(sessionId: string, repairDetails: RepairDetails, pmcData: IPmcData): void;
|
addRepairSkillPoints(sessionId: string, repairDetails: RepairDetails, pmcData: IPmcData): void;
|
||||||
|
/**
|
||||||
|
* Return an appromixation of the amount of skill points live would return for the given repairDetails
|
||||||
|
* @param repairDetails the repair details to calculate skill points for
|
||||||
|
* @returns the number of skill points to reward the user
|
||||||
|
*/
|
||||||
|
protected getWeaponRepairSkillPoints(repairDetails: RepairDetails): number;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -81,6 +88,13 @@ export declare class RepairService {
|
|||||||
* @returns Multiplier value
|
* @returns Multiplier value
|
||||||
*/
|
*/
|
||||||
protected getBonusMultiplierValue(skillBonusName: string, pmcData: IPmcData): number;
|
protected getBonusMultiplierValue(skillBonusName: string, pmcData: IPmcData): number;
|
||||||
|
/**
|
||||||
|
* Should a repair kit apply total durability loss on repair
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param applyRandomizeDurabilityLoss Value from repair config
|
||||||
|
* @returns True if loss should be applied
|
||||||
|
*/
|
||||||
|
protected shouldRepairKitApplyDurabilityLoss(pmcData: IPmcData, applyRandomizeDurabilityLoss: boolean): boolean;
|
||||||
/**
|
/**
|
||||||
* Update repair kits Resource object if it doesn't exist
|
* Update repair kits Resource object if it doesn't exist
|
||||||
* @param repairKitDetails Repair kit details from db
|
* @param repairKitDetails Repair kit details from db
|
||||||
@ -112,7 +126,7 @@ export declare class RepairService {
|
|||||||
* @param itemTemplate Item to check for skill
|
* @param itemTemplate Item to check for skill
|
||||||
* @returns Skill name
|
* @returns Skill name
|
||||||
*/
|
*/
|
||||||
protected getItemSkillType(itemTemplate: ITemplateItem): string;
|
protected getItemSkillType(itemTemplate: ITemplateItem): SkillTypes;
|
||||||
/**
|
/**
|
||||||
* Ensure multiplier is between 1 and 0.01
|
* Ensure multiplier is between 1 and 0.01
|
||||||
* @param receiveDurabilityMaxPercent Max durabiltiy percent
|
* @param receiveDurabilityMaxPercent Max durabiltiy percent
|
||||||
@ -123,6 +137,7 @@ export declare class RepairService {
|
|||||||
}
|
}
|
||||||
export declare class RepairDetails {
|
export declare class RepairDetails {
|
||||||
repairCost?: number;
|
repairCost?: number;
|
||||||
|
repairPoints?: number;
|
||||||
repairedItem: Item;
|
repairedItem: Item;
|
||||||
repairedItemIsArmor: boolean;
|
repairedItemIsArmor: boolean;
|
||||||
repairAmount: number;
|
repairAmount: number;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { OnLoad } from "@spt-aki/di/OnLoad";
|
import { OnLoad } from "@spt-aki/di/OnLoad";
|
||||||
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
||||||
|
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { EncodingUtil } from "@spt-aki/utils/EncodingUtil";
|
import { EncodingUtil } from "@spt-aki/utils/EncodingUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -8,11 +10,13 @@ export declare class App {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
protected encodingUtil: EncodingUtil;
|
protected encodingUtil: EncodingUtil;
|
||||||
protected onLoadComponents: OnLoad[];
|
protected onLoadComponents: OnLoad[];
|
||||||
protected onUpdateComponents: OnUpdate[];
|
protected onUpdateComponents: OnUpdate[];
|
||||||
protected onUpdateLastRun: {};
|
protected onUpdateLastRun: {};
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, encodingUtil: EncodingUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]);
|
protected coreConfig: ICoreConfig;
|
||||||
|
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, configServer: ConfigServer, encodingUtil: EncodingUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]);
|
||||||
load(): Promise<void>;
|
load(): Promise<void>;
|
||||||
protected update(onUpdateComponents: OnUpdate[]): Promise<void>;
|
protected update(onUpdateComponents: OnUpdate[]): Promise<void>;
|
||||||
protected logUpdateException(err: any, updateable: OnUpdate): void;
|
protected logUpdateException(err: any, updateable: OnUpdate): void;
|
||||||
|
@ -61,6 +61,10 @@ export declare class GameController {
|
|||||||
* Handle client/game/start
|
* Handle client/game/start
|
||||||
*/
|
*/
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||||
|
/**
|
||||||
|
* Out of date/incorrectly made trader mods forget this data
|
||||||
|
*/
|
||||||
|
protected checkTraderRepairValuesExist(): void;
|
||||||
protected addCustomLooseLootPositions(): void;
|
protected addCustomLooseLootPositions(): void;
|
||||||
protected adjustLooseLootSpawnProbabilities(): void;
|
protected adjustLooseLootSpawnProbabilities(): void;
|
||||||
protected setHideoutAreasAndCraftsTo40Secs(): void;
|
protected setHideoutAreasAndCraftsTo40Secs(): void;
|
||||||
|
@ -8,7 +8,7 @@ import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGet
|
|||||||
import { IGetInsuranceCostResponseData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostResponseData";
|
import { IGetInsuranceCostResponseData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostResponseData";
|
||||||
import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData";
|
import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { Insurance, ISystemData } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { ISystemData, Insurance } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
|
@ -13,6 +13,7 @@ import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||||
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
@ -21,8 +22,9 @@ import { ObjectId } from "@spt-aki/utils/ObjectId";
|
|||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
export declare class RepeatableQuestController {
|
export declare class RepeatableQuestController {
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
@ -37,7 +39,7 @@ export declare class RepeatableQuestController {
|
|||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Handle client/repeatalbeQuests/activityPeriods
|
* Handle client/repeatalbeQuests/activityPeriods
|
||||||
* Returns an array of objects in the format of repeatable quests to the client.
|
* Returns an array of objects in the format of repeatable quests to the client.
|
||||||
@ -64,6 +66,13 @@ export declare class RepeatableQuestController {
|
|||||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
|
/**
|
||||||
|
* Get the number of quests to generate - takes into account charisma state of player
|
||||||
|
* @param repeatableConfig Config
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @returns Quest count
|
||||||
|
*/
|
||||||
|
protected getQuestCount(repeatableConfig: IRepeatableQuestConfig, pmcData: IPmcData): number;
|
||||||
/**
|
/**
|
||||||
* Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
|
* Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
|
||||||
* @param repeatableConfig daily/weekly config
|
* @param repeatableConfig daily/weekly config
|
||||||
|
@ -179,7 +179,7 @@ export declare class BotEquipmentModGenerator {
|
|||||||
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
||||||
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
||||||
* @param items The items where the CylinderMagazine's camora are appended to
|
* @param items The items where the CylinderMagazine's camora are appended to
|
||||||
* @param modPool modPool which should include available cartrigdes
|
* @param modPool modPool which should include available cartridges
|
||||||
* @param parentId The CylinderMagazine's UID
|
* @param parentId The CylinderMagazine's UID
|
||||||
* @param parentTemplate The CylinderMagazine's template
|
* @param parentTemplate The CylinderMagazine's template
|
||||||
*/
|
*/
|
||||||
|
@ -83,7 +83,7 @@ export declare class BotLootGenerator {
|
|||||||
* @param equipmentSlot slot to place the preset in (backpack)
|
* @param equipmentSlot slot to place the preset in (backpack)
|
||||||
* @param templateInventory bots template, assault.json
|
* @param templateInventory bots template, assault.json
|
||||||
* @param modChances chances for mods to spawn on weapon
|
* @param modChances chances for mods to spawn on weapon
|
||||||
* @param botRole bots role, .e.g. pmcBot
|
* @param botRole bots role .e.g. pmcBot
|
||||||
* @param isPmc are we generating for a pmc
|
* @param isPmc are we generating for a pmc
|
||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
@ -120,16 +120,16 @@ export declare class BotLootGenerator {
|
|||||||
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
||||||
/**
|
/**
|
||||||
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
||||||
* @param isPmc is this a PMC
|
* @param isPmc Is money on a PMC bot
|
||||||
* @param itemTemplate item details
|
* @param itemTemplate item details from db
|
||||||
* @param moneyItem Money stack to randomise
|
* @param moneyItem Money item to randomise
|
||||||
*/
|
*/
|
||||||
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
||||||
/**
|
/**
|
||||||
* Randomise the size of an ammo stack
|
* Randomise the size of an ammo stack
|
||||||
* @param isPmc is this a PMC
|
* @param isPmc Is ammo on a PMC bot
|
||||||
* @param itemTemplate item details
|
* @param itemTemplate item details from db
|
||||||
* @param ammoItem Ammo stack to randomise
|
* @param ammoItem Ammo item to randomise
|
||||||
*/
|
*/
|
||||||
protected randomiseAmmoStackSize(isPmc: boolean, itemTemplate: ITemplateItem, ammoItem: Item): void;
|
protected randomiseAmmoStackSize(isPmc: boolean, itemTemplate: ITemplateItem, ammoItem: Item): void;
|
||||||
/**
|
/**
|
||||||
|
@ -8,7 +8,7 @@ import { Exit } from "@spt-aki/models/eft/common/ILocationBase";
|
|||||||
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPickup, IRepeatableQuest, IReward, IRewards } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPickup, IRepeatableQuest, IReward, IRewards } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
import { IBaseQuestConfig, IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||||
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
@ -155,7 +155,7 @@ export declare class RepeatableQuestGenerator {
|
|||||||
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
||||||
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
||||||
*/
|
*/
|
||||||
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): IRewards;
|
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IRewards;
|
||||||
/**
|
/**
|
||||||
* Select a number of items that have a colelctive value of the passed in parameter
|
* Select a number of items that have a colelctive value of the passed in parameter
|
||||||
* @param repeatableConfig Config
|
* @param repeatableConfig Config
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Common, HideoutArea, IHideoutImprovement, Production, Productive } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { HideoutArea, IHideoutImprovement, Production, Productive } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea";
|
import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea";
|
||||||
import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
||||||
@ -201,22 +201,10 @@ export declare class HideoutHelper {
|
|||||||
* @returns coin slot count
|
* @returns coin slot count
|
||||||
*/
|
*/
|
||||||
protected getBTCSlots(pmcData: IPmcData): number;
|
protected getBTCSlots(pmcData: IPmcData): 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
|
* Get a count of bitcoins player miner can hold
|
||||||
*/
|
*/
|
||||||
protected getBitcoinMinerContainerSlotSize(): number;
|
protected getBitcoinMinerContainerSlotSize(): number;
|
||||||
/**
|
|
||||||
* Get the hideout management skill from player profile
|
|
||||||
* @param pmcData Profile to look at
|
|
||||||
* @returns Hideout management skill object
|
|
||||||
*/
|
|
||||||
protected getHideoutManagementSkill(pmcData: IPmcData): Common;
|
|
||||||
/**
|
/**
|
||||||
* HideoutManagement skill gives a consumption bonus the higher the level
|
* HideoutManagement skill gives a consumption bonus the higher the level
|
||||||
* 0.5% per level per 1-51, (25.5% at max)
|
* 0.5% per level per 1-51, (25.5% at max)
|
||||||
|
@ -7,6 +7,7 @@ import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService";
|
import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService";
|
||||||
|
import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
|
||||||
import { LocaleService } from "@spt-aki/services/LocaleService";
|
import { LocaleService } from "@spt-aki/services/LocaleService";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
@ -24,10 +25,11 @@ declare class ItemHelper {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected itemBaseClassService: ItemBaseClassService;
|
protected itemBaseClassService: ItemBaseClassService;
|
||||||
|
protected itemFilterService: ItemFilterService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected localeService: LocaleService;
|
protected localeService: LocaleService;
|
||||||
protected readonly defaultInvalidBaseTypes: string[];
|
protected readonly defaultInvalidBaseTypes: string[];
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, localisationService: LocalisationService, localeService: LocaleService);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService);
|
||||||
/**
|
/**
|
||||||
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
||||||
* @param {string} tpl the template id / tpl
|
* @param {string} tpl the template id / tpl
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { CounterKeyValue, Stats } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { Common, CounterKeyValue, Stats } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData";
|
import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData";
|
||||||
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService";
|
import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -19,7 +21,8 @@ export declare class ProfileHelper {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileSnapshotService: ProfileSnapshotService;
|
protected profileSnapshotService: ProfileSnapshotService;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService);
|
protected localisationService: LocalisationService;
|
||||||
|
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService);
|
||||||
/**
|
/**
|
||||||
* Remove/reset a completed quest condtion from players profile quest data
|
* Remove/reset a completed quest condtion from players profile quest data
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -101,4 +104,21 @@ export declare class ProfileHelper {
|
|||||||
* @param keyToIncrement Key
|
* @param keyToIncrement Key
|
||||||
*/
|
*/
|
||||||
incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void;
|
incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void;
|
||||||
|
/**
|
||||||
|
* Check if player has a skill at elite level
|
||||||
|
* @param skillType Skill to check
|
||||||
|
* @param pmcProfile Profile to find skill in
|
||||||
|
* @returns True if player has skill at elite level
|
||||||
|
*/
|
||||||
|
hasEliteSkillLevel(skillType: SkillTypes, pmcProfile: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Add points to a specific skill in player profile
|
||||||
|
* @param skill Skill to add points to
|
||||||
|
* @param pointsToAdd Points to add
|
||||||
|
* @param pmcProfile Player profile with skill
|
||||||
|
* @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
addSkillPointsToPlayer(pmcProfile: IPmcData, skill: SkillTypes, pointsToAdd: number, useSkillProgressRateMultipler?: boolean): void;
|
||||||
|
getSkillFromProfile(pmcData: IPmcData, skill: SkillTypes): Common;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import { QuestConditionHelper } from "@spt-aki/helpers/QuestConditionHelper";
|
|||||||
import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { Common, IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "@spt-aki/models/eft/common/tables/IQuest";
|
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "@spt-aki/models/eft/common/tables/IQuest";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
@ -66,14 +66,12 @@ export declare class QuestHelper {
|
|||||||
*/
|
*/
|
||||||
getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[];
|
getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[];
|
||||||
/**
|
/**
|
||||||
* Increase skill points of a skill on player profile
|
* Adjust skill experience for low skill levels, mimicing the official client
|
||||||
* Dupe of PlayerService.incrementSkillLevel()
|
* @param profileSkill the skill experience is being added to
|
||||||
* @param sessionID Session id
|
* @param progressAmount the amount of experience being added to the skill
|
||||||
* @param pmcData Player profile
|
* @returns the adjusted skill progress gain
|
||||||
* @param skillName Name of skill to increase skill points of
|
|
||||||
* @param progressAmount Amount of skill points to add to skill
|
|
||||||
*/
|
*/
|
||||||
rewardSkillPoints(sessionID: string, pmcData: IPmcData, skillName: string, progressAmount: number): void;
|
adjustSkillExpForLowLevels(profileSkill: Common, progressAmount: number): number;
|
||||||
/**
|
/**
|
||||||
* Get quest name by quest id
|
* Get quest name by quest id
|
||||||
* @param questId id to get
|
* @param questId id to get
|
||||||
|
@ -29,7 +29,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
protected serverDependencies: Record<string, string>;
|
protected serverDependencies: Record<string, string>;
|
||||||
protected skippedMods: string[];
|
protected skippedMods: Set<string>;
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modLoadOrder: ModLoadOrder, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modLoadOrder: ModLoadOrder, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -44,27 +44,22 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected sortMods(prev: string, next: string, missingFromOrderJSON: Record<string, boolean>): number;
|
protected sortMods(prev: string, next: string, missingFromOrderJSON: Record<string, boolean>): number;
|
||||||
/**
|
/**
|
||||||
* Check for duplicate mods loaded, show error if any
|
* Check for duplicate mods loaded, show error if any
|
||||||
* @param modPackageData Dictionary of mod package.json data
|
* @param modPackageData map of mod package.json data
|
||||||
*/
|
*/
|
||||||
protected checkForDuplicateMods(modPackageData: Record<string, IPackageJsonData>): void;
|
protected checkForDuplicateMods(modPackageData: Map<string, IPackageJsonData>): void;
|
||||||
/**
|
/**
|
||||||
* Check for and return duplicate strings inside an array
|
* Returns an array of valid mods.
|
||||||
* @param stringArray Array to check for duplicates
|
*
|
||||||
* @returns string array of duplicates, empty if none found
|
|
||||||
*/
|
|
||||||
protected getDuplicates(stringArray: string[]): string[];
|
|
||||||
/**
|
|
||||||
* Get an array of mods with errors that prevent them from working with SPT
|
|
||||||
* @param mods mods to validate
|
* @param mods mods to validate
|
||||||
* @returns Mod names as array
|
* @returns array of mod folder names
|
||||||
*/
|
*/
|
||||||
protected getBrokenMods(mods: string[]): string[];
|
protected getValidMods(mods: string[]): string[];
|
||||||
/**
|
/**
|
||||||
* Get packageJson data for mods
|
* Get packageJson data for mods
|
||||||
* @param mods mods to get packageJson for
|
* @param mods mods to get packageJson for
|
||||||
* @returns dictionary <modName - package.json>
|
* @returns map <modFolderName - package.json>
|
||||||
*/
|
*/
|
||||||
protected getModsPackageData(mods: string[]): Record<string, IPackageJsonData>;
|
protected getModsPackageData(mods: string[]): Map<string, IPackageJsonData>;
|
||||||
/**
|
/**
|
||||||
* Is the passed in mod compatible with the running server version
|
* Is the passed in mod compatible with the running server version
|
||||||
* @param mod Mod to check compatibiltiy with AKI
|
* @param mod Mod to check compatibiltiy with AKI
|
||||||
@ -86,10 +81,17 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
* Compile mod and add into class property "imported"
|
* Compile mod and add into class property "imported"
|
||||||
* @param mod Name of mod to compile/add
|
* @param mod Name of mod to compile/add
|
||||||
*/
|
*/
|
||||||
protected addModAsync(mod: string): Promise<void>;
|
protected addModAsync(mod: string, pkg: IPackageJsonData): Promise<void>;
|
||||||
|
/**
|
||||||
|
* Checks if a given mod should be loaded or skipped.
|
||||||
|
*
|
||||||
|
* @param pkg mod package.json data
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected shouldSkipMod(pkg: IPackageJsonData): boolean;
|
||||||
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Map<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Map<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
* Validate a mod passes a number of checks
|
* Validate a mod passes a number of checks
|
||||||
* @param modName name of mod in /mods/ to validate
|
* @param modName name of mod in /mods/ to validate
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
export declare enum SkillTypes {
|
export declare enum SkillTypes {
|
||||||
|
BOT_RELOAD = "BotReload",
|
||||||
|
BOT_SOUND = "BotSound",
|
||||||
HIDEOUT_MANAGEMENT = "HideoutManagement",
|
HIDEOUT_MANAGEMENT = "HideoutManagement",
|
||||||
CRAFTING = "Crafting",
|
CRAFTING = "Crafting",
|
||||||
METABOLISM = "Metabolism",
|
METABOLISM = "Metabolism",
|
||||||
@ -19,6 +21,7 @@ export declare enum SkillTypes {
|
|||||||
ATTENTION = "Attention",
|
ATTENTION = "Attention",
|
||||||
CHARISMA = "Charisma",
|
CHARISMA = "Charisma",
|
||||||
MEMORY = "Memory",
|
MEMORY = "Memory",
|
||||||
|
MELEE = "Melee",
|
||||||
SURGERY = "Surgery",
|
SURGERY = "Surgery",
|
||||||
AIM_DRILLS = "AimDrills",
|
AIM_DRILLS = "AimDrills",
|
||||||
TROUBLESHOOTING = "TroubleShooting",
|
TROUBLESHOOTING = "TroubleShooting",
|
||||||
@ -31,6 +34,7 @@ export declare enum SkillTypes {
|
|||||||
NIGHT_OPS = "NightOps",
|
NIGHT_OPS = "NightOps",
|
||||||
SILENT_OPS = "SilentOps",
|
SILENT_OPS = "SilentOps",
|
||||||
LOCKPICKING = "Lockpicking",
|
LOCKPICKING = "Lockpicking",
|
||||||
|
/** Also called Weapon Maintenance*/
|
||||||
WEAPON_TREATMENT = "WeaponTreatment",
|
WEAPON_TREATMENT = "WeaponTreatment",
|
||||||
MAG_DRILLS = "MagDrills",
|
MAG_DRILLS = "MagDrills",
|
||||||
FREE_TRADING = "Freetrading",
|
FREE_TRADING = "Freetrading",
|
||||||
|
@ -102,6 +102,8 @@ export interface EquipmentFilters {
|
|||||||
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||||
/** Same as weightingAdjustments but based on player level instead of bot level */
|
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||||
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||||
|
/** Should the stock mod be forced to spawn on bot */
|
||||||
|
forceStock: boolean;
|
||||||
}
|
}
|
||||||
export interface ModLimits {
|
export interface ModLimits {
|
||||||
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
||||||
|
@ -55,6 +55,8 @@ export interface IRewardScaling {
|
|||||||
items: number[];
|
items: number[];
|
||||||
reputation: number[];
|
reputation: number[];
|
||||||
rewardSpread: number;
|
rewardSpread: number;
|
||||||
|
skillRewardChance: number[];
|
||||||
|
skillPointReward: number[];
|
||||||
}
|
}
|
||||||
export interface ITraderWhitelist {
|
export interface ITraderWhitelist {
|
||||||
traderId: string;
|
traderId: string;
|
||||||
@ -66,7 +68,7 @@ export interface IRepeatableQuestTypesConfig {
|
|||||||
Pickup: IPickup;
|
Pickup: IPickup;
|
||||||
Elimination: IEliminationConfig[];
|
Elimination: IEliminationConfig[];
|
||||||
}
|
}
|
||||||
export interface IExploration {
|
export interface IExploration extends IBaseQuestConfig {
|
||||||
maxExtracts: number;
|
maxExtracts: number;
|
||||||
specificExits: ISpecificExits;
|
specificExits: ISpecificExits;
|
||||||
}
|
}
|
||||||
@ -74,7 +76,7 @@ export interface ISpecificExits {
|
|||||||
probability: number;
|
probability: number;
|
||||||
passageRequirementWhitelist: string[];
|
passageRequirementWhitelist: string[];
|
||||||
}
|
}
|
||||||
export interface ICompletion {
|
export interface ICompletion extends IBaseQuestConfig {
|
||||||
minRequestedAmount: number;
|
minRequestedAmount: number;
|
||||||
maxRequestedAmount: number;
|
maxRequestedAmount: number;
|
||||||
minRequestedBulletAmount: number;
|
minRequestedBulletAmount: number;
|
||||||
@ -82,7 +84,7 @@ export interface ICompletion {
|
|||||||
useWhitelist: boolean;
|
useWhitelist: boolean;
|
||||||
useBlacklist: boolean;
|
useBlacklist: boolean;
|
||||||
}
|
}
|
||||||
export interface IPickup {
|
export interface IPickup extends IBaseQuestConfig {
|
||||||
ItemTypeToFetchWithMaxCount: IPickupTypeWithMaxCount[];
|
ItemTypeToFetchWithMaxCount: IPickupTypeWithMaxCount[];
|
||||||
}
|
}
|
||||||
export interface IPickupTypeWithMaxCount {
|
export interface IPickupTypeWithMaxCount {
|
||||||
@ -90,7 +92,7 @@ export interface IPickupTypeWithMaxCount {
|
|||||||
maxPickupCount: number;
|
maxPickupCount: number;
|
||||||
minPickupCount: number;
|
minPickupCount: number;
|
||||||
}
|
}
|
||||||
export interface IEliminationConfig {
|
export interface IEliminationConfig extends IBaseQuestConfig {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
targets: ITarget[];
|
targets: ITarget[];
|
||||||
bodyPartProb: number;
|
bodyPartProb: number;
|
||||||
@ -111,6 +113,9 @@ export interface IEliminationConfig {
|
|||||||
weaponRequirementProb: number;
|
weaponRequirementProb: number;
|
||||||
weaponRequirements: IWeaponRequirement[];
|
weaponRequirements: IWeaponRequirement[];
|
||||||
}
|
}
|
||||||
|
export interface IBaseQuestConfig {
|
||||||
|
possibleSkillRewards: string[];
|
||||||
|
}
|
||||||
export interface ITarget extends IProbabilityObject {
|
export interface ITarget extends IProbabilityObject {
|
||||||
data: IBossInfo;
|
data: IBossInfo;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ export interface IRepairConfig extends IBaseConfig {
|
|||||||
/** INT gain multiplier per repaired item type */
|
/** INT gain multiplier per repaired item type */
|
||||||
repairKitIntellectGainMultiplier: IIntellectGainValues;
|
repairKitIntellectGainMultiplier: IIntellectGainValues;
|
||||||
maxIntellectGainPerRepair: IMaxIntellectGainValues;
|
maxIntellectGainPerRepair: IMaxIntellectGainValues;
|
||||||
|
weaponTreatment: IWeaponTreatmentRepairValues;
|
||||||
repairKit: RepairKit;
|
repairKit: RepairKit;
|
||||||
}
|
}
|
||||||
export interface IIntellectGainValues {
|
export interface IIntellectGainValues {
|
||||||
@ -19,6 +20,16 @@ export interface IMaxIntellectGainValues {
|
|||||||
kit: number;
|
kit: number;
|
||||||
trader: number;
|
trader: number;
|
||||||
}
|
}
|
||||||
|
export interface IWeaponTreatmentRepairValues {
|
||||||
|
/** The chance to gain more weapon maintenance skill */
|
||||||
|
critSuccessChance: number;
|
||||||
|
critSuccessAmount: number;
|
||||||
|
/** The chance to gain less weapon maintenance skill */
|
||||||
|
critFailureChance: number;
|
||||||
|
critFailureAmount: number;
|
||||||
|
/** The multiplier used for calculating weapon maintenance XP */
|
||||||
|
pointGainMultiplier: number;
|
||||||
|
}
|
||||||
export interface RepairKit {
|
export interface RepairKit {
|
||||||
armor: BonusSettings;
|
armor: BonusSettings;
|
||||||
weapon: BonusSettings;
|
weapon: BonusSettings;
|
||||||
|
@ -9,15 +9,6 @@ export declare class PlayerService {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
||||||
/**
|
|
||||||
* 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, useSkillProgressRateMultipler?: boolean): void;
|
|
||||||
/**
|
/**
|
||||||
* Get level of player
|
* Get level of player
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { QuestHelper } from "@spt-aki/helpers/QuestHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { RepairHelper } from "@spt-aki/helpers/RepairHelper";
|
import { RepairHelper } from "@spt-aki/helpers/RepairHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
@ -9,6 +9,7 @@ import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
|||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { RepairKitsInfo } from "@spt-aki/models/eft/repair/IRepairActionDataRequest";
|
import { RepairKitsInfo } from "@spt-aki/models/eft/repair/IRepairActionDataRequest";
|
||||||
import { RepairItem } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest";
|
import { RepairItem } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest";
|
||||||
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
import { BonusSettings, IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig";
|
import { BonusSettings, IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
@ -19,7 +20,7 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
|||||||
export declare class RepairService {
|
export declare class RepairService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected questHelper: QuestHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
@ -29,7 +30,7 @@ export declare class RepairService {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected repairConfig: IRepairConfig;
|
protected repairConfig: IRepairConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, profileHelper: ProfileHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Use trader to repair an items durability
|
* Use trader to repair an items durability
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -56,6 +57,12 @@ export declare class RepairService {
|
|||||||
* @param pmcData Profile to add points to
|
* @param pmcData Profile to add points to
|
||||||
*/
|
*/
|
||||||
addRepairSkillPoints(sessionId: string, repairDetails: RepairDetails, pmcData: IPmcData): void;
|
addRepairSkillPoints(sessionId: string, repairDetails: RepairDetails, pmcData: IPmcData): void;
|
||||||
|
/**
|
||||||
|
* Return an appromixation of the amount of skill points live would return for the given repairDetails
|
||||||
|
* @param repairDetails the repair details to calculate skill points for
|
||||||
|
* @returns the number of skill points to reward the user
|
||||||
|
*/
|
||||||
|
protected getWeaponRepairSkillPoints(repairDetails: RepairDetails): number;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -81,6 +88,13 @@ export declare class RepairService {
|
|||||||
* @returns Multiplier value
|
* @returns Multiplier value
|
||||||
*/
|
*/
|
||||||
protected getBonusMultiplierValue(skillBonusName: string, pmcData: IPmcData): number;
|
protected getBonusMultiplierValue(skillBonusName: string, pmcData: IPmcData): number;
|
||||||
|
/**
|
||||||
|
* Should a repair kit apply total durability loss on repair
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param applyRandomizeDurabilityLoss Value from repair config
|
||||||
|
* @returns True if loss should be applied
|
||||||
|
*/
|
||||||
|
protected shouldRepairKitApplyDurabilityLoss(pmcData: IPmcData, applyRandomizeDurabilityLoss: boolean): boolean;
|
||||||
/**
|
/**
|
||||||
* Update repair kits Resource object if it doesn't exist
|
* Update repair kits Resource object if it doesn't exist
|
||||||
* @param repairKitDetails Repair kit details from db
|
* @param repairKitDetails Repair kit details from db
|
||||||
@ -112,7 +126,7 @@ export declare class RepairService {
|
|||||||
* @param itemTemplate Item to check for skill
|
* @param itemTemplate Item to check for skill
|
||||||
* @returns Skill name
|
* @returns Skill name
|
||||||
*/
|
*/
|
||||||
protected getItemSkillType(itemTemplate: ITemplateItem): string;
|
protected getItemSkillType(itemTemplate: ITemplateItem): SkillTypes;
|
||||||
/**
|
/**
|
||||||
* Ensure multiplier is between 1 and 0.01
|
* Ensure multiplier is between 1 and 0.01
|
||||||
* @param receiveDurabilityMaxPercent Max durabiltiy percent
|
* @param receiveDurabilityMaxPercent Max durabiltiy percent
|
||||||
@ -123,6 +137,7 @@ export declare class RepairService {
|
|||||||
}
|
}
|
||||||
export declare class RepairDetails {
|
export declare class RepairDetails {
|
||||||
repairCost?: number;
|
repairCost?: number;
|
||||||
|
repairPoints?: number;
|
||||||
repairedItem: Item;
|
repairedItem: Item;
|
||||||
repairedItemIsArmor: boolean;
|
repairedItemIsArmor: boolean;
|
||||||
repairAmount: number;
|
repairAmount: number;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { OnLoad } from "@spt-aki/di/OnLoad";
|
import { OnLoad } from "@spt-aki/di/OnLoad";
|
||||||
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
||||||
|
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { EncodingUtil } from "@spt-aki/utils/EncodingUtil";
|
import { EncodingUtil } from "@spt-aki/utils/EncodingUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -8,11 +10,13 @@ export declare class App {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
protected encodingUtil: EncodingUtil;
|
protected encodingUtil: EncodingUtil;
|
||||||
protected onLoadComponents: OnLoad[];
|
protected onLoadComponents: OnLoad[];
|
||||||
protected onUpdateComponents: OnUpdate[];
|
protected onUpdateComponents: OnUpdate[];
|
||||||
protected onUpdateLastRun: {};
|
protected onUpdateLastRun: {};
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, encodingUtil: EncodingUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]);
|
protected coreConfig: ICoreConfig;
|
||||||
|
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, configServer: ConfigServer, encodingUtil: EncodingUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]);
|
||||||
load(): Promise<void>;
|
load(): Promise<void>;
|
||||||
protected update(onUpdateComponents: OnUpdate[]): Promise<void>;
|
protected update(onUpdateComponents: OnUpdate[]): Promise<void>;
|
||||||
protected logUpdateException(err: any, updateable: OnUpdate): void;
|
protected logUpdateException(err: any, updateable: OnUpdate): void;
|
||||||
|
@ -61,6 +61,10 @@ export declare class GameController {
|
|||||||
* Handle client/game/start
|
* Handle client/game/start
|
||||||
*/
|
*/
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||||
|
/**
|
||||||
|
* Out of date/incorrectly made trader mods forget this data
|
||||||
|
*/
|
||||||
|
protected checkTraderRepairValuesExist(): void;
|
||||||
protected addCustomLooseLootPositions(): void;
|
protected addCustomLooseLootPositions(): void;
|
||||||
protected adjustLooseLootSpawnProbabilities(): void;
|
protected adjustLooseLootSpawnProbabilities(): void;
|
||||||
protected setHideoutAreasAndCraftsTo40Secs(): void;
|
protected setHideoutAreasAndCraftsTo40Secs(): void;
|
||||||
|
@ -8,7 +8,7 @@ import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGet
|
|||||||
import { IGetInsuranceCostResponseData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostResponseData";
|
import { IGetInsuranceCostResponseData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostResponseData";
|
||||||
import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData";
|
import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { Insurance, ISystemData } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { ISystemData, Insurance } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
|
@ -13,6 +13,7 @@ import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||||
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
@ -21,8 +22,9 @@ import { ObjectId } from "@spt-aki/utils/ObjectId";
|
|||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
export declare class RepeatableQuestController {
|
export declare class RepeatableQuestController {
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
@ -37,7 +39,7 @@ export declare class RepeatableQuestController {
|
|||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Handle client/repeatalbeQuests/activityPeriods
|
* Handle client/repeatalbeQuests/activityPeriods
|
||||||
* Returns an array of objects in the format of repeatable quests to the client.
|
* Returns an array of objects in the format of repeatable quests to the client.
|
||||||
@ -64,6 +66,13 @@ export declare class RepeatableQuestController {
|
|||||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
|
/**
|
||||||
|
* Get the number of quests to generate - takes into account charisma state of player
|
||||||
|
* @param repeatableConfig Config
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @returns Quest count
|
||||||
|
*/
|
||||||
|
protected getQuestCount(repeatableConfig: IRepeatableQuestConfig, pmcData: IPmcData): number;
|
||||||
/**
|
/**
|
||||||
* Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
|
* Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
|
||||||
* @param repeatableConfig daily/weekly config
|
* @param repeatableConfig daily/weekly config
|
||||||
|
@ -179,7 +179,7 @@ export declare class BotEquipmentModGenerator {
|
|||||||
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
||||||
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
||||||
* @param items The items where the CylinderMagazine's camora are appended to
|
* @param items The items where the CylinderMagazine's camora are appended to
|
||||||
* @param modPool modPool which should include available cartrigdes
|
* @param modPool modPool which should include available cartridges
|
||||||
* @param parentId The CylinderMagazine's UID
|
* @param parentId The CylinderMagazine's UID
|
||||||
* @param parentTemplate The CylinderMagazine's template
|
* @param parentTemplate The CylinderMagazine's template
|
||||||
*/
|
*/
|
||||||
|
@ -83,7 +83,7 @@ export declare class BotLootGenerator {
|
|||||||
* @param equipmentSlot slot to place the preset in (backpack)
|
* @param equipmentSlot slot to place the preset in (backpack)
|
||||||
* @param templateInventory bots template, assault.json
|
* @param templateInventory bots template, assault.json
|
||||||
* @param modChances chances for mods to spawn on weapon
|
* @param modChances chances for mods to spawn on weapon
|
||||||
* @param botRole bots role, .e.g. pmcBot
|
* @param botRole bots role .e.g. pmcBot
|
||||||
* @param isPmc are we generating for a pmc
|
* @param isPmc are we generating for a pmc
|
||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
@ -120,16 +120,16 @@ export declare class BotLootGenerator {
|
|||||||
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
||||||
/**
|
/**
|
||||||
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
||||||
* @param isPmc is this a PMC
|
* @param isPmc Is money on a PMC bot
|
||||||
* @param itemTemplate item details
|
* @param itemTemplate item details from db
|
||||||
* @param moneyItem Money stack to randomise
|
* @param moneyItem Money item to randomise
|
||||||
*/
|
*/
|
||||||
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
||||||
/**
|
/**
|
||||||
* Randomise the size of an ammo stack
|
* Randomise the size of an ammo stack
|
||||||
* @param isPmc is this a PMC
|
* @param isPmc Is ammo on a PMC bot
|
||||||
* @param itemTemplate item details
|
* @param itemTemplate item details from db
|
||||||
* @param ammoItem Ammo stack to randomise
|
* @param ammoItem Ammo item to randomise
|
||||||
*/
|
*/
|
||||||
protected randomiseAmmoStackSize(isPmc: boolean, itemTemplate: ITemplateItem, ammoItem: Item): void;
|
protected randomiseAmmoStackSize(isPmc: boolean, itemTemplate: ITemplateItem, ammoItem: Item): void;
|
||||||
/**
|
/**
|
||||||
|
@ -8,7 +8,7 @@ import { Exit } from "@spt-aki/models/eft/common/ILocationBase";
|
|||||||
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPickup, IRepeatableQuest, IReward, IRewards } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPickup, IRepeatableQuest, IReward, IRewards } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
import { IBaseQuestConfig, IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||||
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
@ -155,7 +155,7 @@ export declare class RepeatableQuestGenerator {
|
|||||||
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
||||||
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
||||||
*/
|
*/
|
||||||
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): IRewards;
|
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IRewards;
|
||||||
/**
|
/**
|
||||||
* Select a number of items that have a colelctive value of the passed in parameter
|
* Select a number of items that have a colelctive value of the passed in parameter
|
||||||
* @param repeatableConfig Config
|
* @param repeatableConfig Config
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Common, HideoutArea, IHideoutImprovement, Production, Productive } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { HideoutArea, IHideoutImprovement, Production, Productive } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea";
|
import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea";
|
||||||
import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
||||||
@ -201,22 +201,10 @@ export declare class HideoutHelper {
|
|||||||
* @returns coin slot count
|
* @returns coin slot count
|
||||||
*/
|
*/
|
||||||
protected getBTCSlots(pmcData: IPmcData): number;
|
protected getBTCSlots(pmcData: IPmcData): 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
|
* Get a count of bitcoins player miner can hold
|
||||||
*/
|
*/
|
||||||
protected getBitcoinMinerContainerSlotSize(): number;
|
protected getBitcoinMinerContainerSlotSize(): number;
|
||||||
/**
|
|
||||||
* Get the hideout management skill from player profile
|
|
||||||
* @param pmcData Profile to look at
|
|
||||||
* @returns Hideout management skill object
|
|
||||||
*/
|
|
||||||
protected getHideoutManagementSkill(pmcData: IPmcData): Common;
|
|
||||||
/**
|
/**
|
||||||
* HideoutManagement skill gives a consumption bonus the higher the level
|
* HideoutManagement skill gives a consumption bonus the higher the level
|
||||||
* 0.5% per level per 1-51, (25.5% at max)
|
* 0.5% per level per 1-51, (25.5% at max)
|
||||||
|
@ -7,6 +7,7 @@ import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService";
|
import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService";
|
||||||
|
import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
|
||||||
import { LocaleService } from "@spt-aki/services/LocaleService";
|
import { LocaleService } from "@spt-aki/services/LocaleService";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
@ -24,10 +25,11 @@ declare class ItemHelper {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected itemBaseClassService: ItemBaseClassService;
|
protected itemBaseClassService: ItemBaseClassService;
|
||||||
|
protected itemFilterService: ItemFilterService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected localeService: LocaleService;
|
protected localeService: LocaleService;
|
||||||
protected readonly defaultInvalidBaseTypes: string[];
|
protected readonly defaultInvalidBaseTypes: string[];
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, localisationService: LocalisationService, localeService: LocaleService);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService);
|
||||||
/**
|
/**
|
||||||
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
||||||
* @param {string} tpl the template id / tpl
|
* @param {string} tpl the template id / tpl
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { CounterKeyValue, Stats } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { Common, CounterKeyValue, Stats } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData";
|
import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData";
|
||||||
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService";
|
import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -19,7 +21,8 @@ export declare class ProfileHelper {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileSnapshotService: ProfileSnapshotService;
|
protected profileSnapshotService: ProfileSnapshotService;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService);
|
protected localisationService: LocalisationService;
|
||||||
|
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService);
|
||||||
/**
|
/**
|
||||||
* Remove/reset a completed quest condtion from players profile quest data
|
* Remove/reset a completed quest condtion from players profile quest data
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -101,4 +104,21 @@ export declare class ProfileHelper {
|
|||||||
* @param keyToIncrement Key
|
* @param keyToIncrement Key
|
||||||
*/
|
*/
|
||||||
incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void;
|
incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void;
|
||||||
|
/**
|
||||||
|
* Check if player has a skill at elite level
|
||||||
|
* @param skillType Skill to check
|
||||||
|
* @param pmcProfile Profile to find skill in
|
||||||
|
* @returns True if player has skill at elite level
|
||||||
|
*/
|
||||||
|
hasEliteSkillLevel(skillType: SkillTypes, pmcProfile: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Add points to a specific skill in player profile
|
||||||
|
* @param skill Skill to add points to
|
||||||
|
* @param pointsToAdd Points to add
|
||||||
|
* @param pmcProfile Player profile with skill
|
||||||
|
* @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
addSkillPointsToPlayer(pmcProfile: IPmcData, skill: SkillTypes, pointsToAdd: number, useSkillProgressRateMultipler?: boolean): void;
|
||||||
|
getSkillFromProfile(pmcData: IPmcData, skill: SkillTypes): Common;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import { QuestConditionHelper } from "@spt-aki/helpers/QuestConditionHelper";
|
|||||||
import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { Common, IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "@spt-aki/models/eft/common/tables/IQuest";
|
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "@spt-aki/models/eft/common/tables/IQuest";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
@ -66,14 +66,12 @@ export declare class QuestHelper {
|
|||||||
*/
|
*/
|
||||||
getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[];
|
getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[];
|
||||||
/**
|
/**
|
||||||
* Increase skill points of a skill on player profile
|
* Adjust skill experience for low skill levels, mimicing the official client
|
||||||
* Dupe of PlayerService.incrementSkillLevel()
|
* @param profileSkill the skill experience is being added to
|
||||||
* @param sessionID Session id
|
* @param progressAmount the amount of experience being added to the skill
|
||||||
* @param pmcData Player profile
|
* @returns the adjusted skill progress gain
|
||||||
* @param skillName Name of skill to increase skill points of
|
|
||||||
* @param progressAmount Amount of skill points to add to skill
|
|
||||||
*/
|
*/
|
||||||
rewardSkillPoints(sessionID: string, pmcData: IPmcData, skillName: string, progressAmount: number): void;
|
adjustSkillExpForLowLevels(profileSkill: Common, progressAmount: number): number;
|
||||||
/**
|
/**
|
||||||
* Get quest name by quest id
|
* Get quest name by quest id
|
||||||
* @param questId id to get
|
* @param questId id to get
|
||||||
|
@ -29,7 +29,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
protected serverDependencies: Record<string, string>;
|
protected serverDependencies: Record<string, string>;
|
||||||
protected skippedMods: string[];
|
protected skippedMods: Set<string>;
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modLoadOrder: ModLoadOrder, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modLoadOrder: ModLoadOrder, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -44,27 +44,22 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected sortMods(prev: string, next: string, missingFromOrderJSON: Record<string, boolean>): number;
|
protected sortMods(prev: string, next: string, missingFromOrderJSON: Record<string, boolean>): number;
|
||||||
/**
|
/**
|
||||||
* Check for duplicate mods loaded, show error if any
|
* Check for duplicate mods loaded, show error if any
|
||||||
* @param modPackageData Dictionary of mod package.json data
|
* @param modPackageData map of mod package.json data
|
||||||
*/
|
*/
|
||||||
protected checkForDuplicateMods(modPackageData: Record<string, IPackageJsonData>): void;
|
protected checkForDuplicateMods(modPackageData: Map<string, IPackageJsonData>): void;
|
||||||
/**
|
/**
|
||||||
* Check for and return duplicate strings inside an array
|
* Returns an array of valid mods.
|
||||||
* @param stringArray Array to check for duplicates
|
*
|
||||||
* @returns string array of duplicates, empty if none found
|
|
||||||
*/
|
|
||||||
protected getDuplicates(stringArray: string[]): string[];
|
|
||||||
/**
|
|
||||||
* Get an array of mods with errors that prevent them from working with SPT
|
|
||||||
* @param mods mods to validate
|
* @param mods mods to validate
|
||||||
* @returns Mod names as array
|
* @returns array of mod folder names
|
||||||
*/
|
*/
|
||||||
protected getBrokenMods(mods: string[]): string[];
|
protected getValidMods(mods: string[]): string[];
|
||||||
/**
|
/**
|
||||||
* Get packageJson data for mods
|
* Get packageJson data for mods
|
||||||
* @param mods mods to get packageJson for
|
* @param mods mods to get packageJson for
|
||||||
* @returns dictionary <modName - package.json>
|
* @returns map <modFolderName - package.json>
|
||||||
*/
|
*/
|
||||||
protected getModsPackageData(mods: string[]): Record<string, IPackageJsonData>;
|
protected getModsPackageData(mods: string[]): Map<string, IPackageJsonData>;
|
||||||
/**
|
/**
|
||||||
* Is the passed in mod compatible with the running server version
|
* Is the passed in mod compatible with the running server version
|
||||||
* @param mod Mod to check compatibiltiy with AKI
|
* @param mod Mod to check compatibiltiy with AKI
|
||||||
@ -86,10 +81,17 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
* Compile mod and add into class property "imported"
|
* Compile mod and add into class property "imported"
|
||||||
* @param mod Name of mod to compile/add
|
* @param mod Name of mod to compile/add
|
||||||
*/
|
*/
|
||||||
protected addModAsync(mod: string): Promise<void>;
|
protected addModAsync(mod: string, pkg: IPackageJsonData): Promise<void>;
|
||||||
|
/**
|
||||||
|
* Checks if a given mod should be loaded or skipped.
|
||||||
|
*
|
||||||
|
* @param pkg mod package.json data
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected shouldSkipMod(pkg: IPackageJsonData): boolean;
|
||||||
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Map<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Map<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
* Validate a mod passes a number of checks
|
* Validate a mod passes a number of checks
|
||||||
* @param modName name of mod in /mods/ to validate
|
* @param modName name of mod in /mods/ to validate
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
export declare enum SkillTypes {
|
export declare enum SkillTypes {
|
||||||
|
BOT_RELOAD = "BotReload",
|
||||||
|
BOT_SOUND = "BotSound",
|
||||||
HIDEOUT_MANAGEMENT = "HideoutManagement",
|
HIDEOUT_MANAGEMENT = "HideoutManagement",
|
||||||
CRAFTING = "Crafting",
|
CRAFTING = "Crafting",
|
||||||
METABOLISM = "Metabolism",
|
METABOLISM = "Metabolism",
|
||||||
@ -19,6 +21,7 @@ export declare enum SkillTypes {
|
|||||||
ATTENTION = "Attention",
|
ATTENTION = "Attention",
|
||||||
CHARISMA = "Charisma",
|
CHARISMA = "Charisma",
|
||||||
MEMORY = "Memory",
|
MEMORY = "Memory",
|
||||||
|
MELEE = "Melee",
|
||||||
SURGERY = "Surgery",
|
SURGERY = "Surgery",
|
||||||
AIM_DRILLS = "AimDrills",
|
AIM_DRILLS = "AimDrills",
|
||||||
TROUBLESHOOTING = "TroubleShooting",
|
TROUBLESHOOTING = "TroubleShooting",
|
||||||
@ -31,6 +34,7 @@ export declare enum SkillTypes {
|
|||||||
NIGHT_OPS = "NightOps",
|
NIGHT_OPS = "NightOps",
|
||||||
SILENT_OPS = "SilentOps",
|
SILENT_OPS = "SilentOps",
|
||||||
LOCKPICKING = "Lockpicking",
|
LOCKPICKING = "Lockpicking",
|
||||||
|
/** Also called Weapon Maintenance*/
|
||||||
WEAPON_TREATMENT = "WeaponTreatment",
|
WEAPON_TREATMENT = "WeaponTreatment",
|
||||||
MAG_DRILLS = "MagDrills",
|
MAG_DRILLS = "MagDrills",
|
||||||
FREE_TRADING = "Freetrading",
|
FREE_TRADING = "Freetrading",
|
||||||
|
@ -102,6 +102,8 @@ export interface EquipmentFilters {
|
|||||||
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||||
/** Same as weightingAdjustments but based on player level instead of bot level */
|
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||||
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||||
|
/** Should the stock mod be forced to spawn on bot */
|
||||||
|
forceStock: boolean;
|
||||||
}
|
}
|
||||||
export interface ModLimits {
|
export interface ModLimits {
|
||||||
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
||||||
|
@ -55,6 +55,8 @@ export interface IRewardScaling {
|
|||||||
items: number[];
|
items: number[];
|
||||||
reputation: number[];
|
reputation: number[];
|
||||||
rewardSpread: number;
|
rewardSpread: number;
|
||||||
|
skillRewardChance: number[];
|
||||||
|
skillPointReward: number[];
|
||||||
}
|
}
|
||||||
export interface ITraderWhitelist {
|
export interface ITraderWhitelist {
|
||||||
traderId: string;
|
traderId: string;
|
||||||
@ -66,7 +68,7 @@ export interface IRepeatableQuestTypesConfig {
|
|||||||
Pickup: IPickup;
|
Pickup: IPickup;
|
||||||
Elimination: IEliminationConfig[];
|
Elimination: IEliminationConfig[];
|
||||||
}
|
}
|
||||||
export interface IExploration {
|
export interface IExploration extends IBaseQuestConfig {
|
||||||
maxExtracts: number;
|
maxExtracts: number;
|
||||||
specificExits: ISpecificExits;
|
specificExits: ISpecificExits;
|
||||||
}
|
}
|
||||||
@ -74,7 +76,7 @@ export interface ISpecificExits {
|
|||||||
probability: number;
|
probability: number;
|
||||||
passageRequirementWhitelist: string[];
|
passageRequirementWhitelist: string[];
|
||||||
}
|
}
|
||||||
export interface ICompletion {
|
export interface ICompletion extends IBaseQuestConfig {
|
||||||
minRequestedAmount: number;
|
minRequestedAmount: number;
|
||||||
maxRequestedAmount: number;
|
maxRequestedAmount: number;
|
||||||
minRequestedBulletAmount: number;
|
minRequestedBulletAmount: number;
|
||||||
@ -82,7 +84,7 @@ export interface ICompletion {
|
|||||||
useWhitelist: boolean;
|
useWhitelist: boolean;
|
||||||
useBlacklist: boolean;
|
useBlacklist: boolean;
|
||||||
}
|
}
|
||||||
export interface IPickup {
|
export interface IPickup extends IBaseQuestConfig {
|
||||||
ItemTypeToFetchWithMaxCount: IPickupTypeWithMaxCount[];
|
ItemTypeToFetchWithMaxCount: IPickupTypeWithMaxCount[];
|
||||||
}
|
}
|
||||||
export interface IPickupTypeWithMaxCount {
|
export interface IPickupTypeWithMaxCount {
|
||||||
@ -90,7 +92,7 @@ export interface IPickupTypeWithMaxCount {
|
|||||||
maxPickupCount: number;
|
maxPickupCount: number;
|
||||||
minPickupCount: number;
|
minPickupCount: number;
|
||||||
}
|
}
|
||||||
export interface IEliminationConfig {
|
export interface IEliminationConfig extends IBaseQuestConfig {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
targets: ITarget[];
|
targets: ITarget[];
|
||||||
bodyPartProb: number;
|
bodyPartProb: number;
|
||||||
@ -111,6 +113,9 @@ export interface IEliminationConfig {
|
|||||||
weaponRequirementProb: number;
|
weaponRequirementProb: number;
|
||||||
weaponRequirements: IWeaponRequirement[];
|
weaponRequirements: IWeaponRequirement[];
|
||||||
}
|
}
|
||||||
|
export interface IBaseQuestConfig {
|
||||||
|
possibleSkillRewards: string[];
|
||||||
|
}
|
||||||
export interface ITarget extends IProbabilityObject {
|
export interface ITarget extends IProbabilityObject {
|
||||||
data: IBossInfo;
|
data: IBossInfo;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ export interface IRepairConfig extends IBaseConfig {
|
|||||||
/** INT gain multiplier per repaired item type */
|
/** INT gain multiplier per repaired item type */
|
||||||
repairKitIntellectGainMultiplier: IIntellectGainValues;
|
repairKitIntellectGainMultiplier: IIntellectGainValues;
|
||||||
maxIntellectGainPerRepair: IMaxIntellectGainValues;
|
maxIntellectGainPerRepair: IMaxIntellectGainValues;
|
||||||
|
weaponTreatment: IWeaponTreatmentRepairValues;
|
||||||
repairKit: RepairKit;
|
repairKit: RepairKit;
|
||||||
}
|
}
|
||||||
export interface IIntellectGainValues {
|
export interface IIntellectGainValues {
|
||||||
@ -19,6 +20,16 @@ export interface IMaxIntellectGainValues {
|
|||||||
kit: number;
|
kit: number;
|
||||||
trader: number;
|
trader: number;
|
||||||
}
|
}
|
||||||
|
export interface IWeaponTreatmentRepairValues {
|
||||||
|
/** The chance to gain more weapon maintenance skill */
|
||||||
|
critSuccessChance: number;
|
||||||
|
critSuccessAmount: number;
|
||||||
|
/** The chance to gain less weapon maintenance skill */
|
||||||
|
critFailureChance: number;
|
||||||
|
critFailureAmount: number;
|
||||||
|
/** The multiplier used for calculating weapon maintenance XP */
|
||||||
|
pointGainMultiplier: number;
|
||||||
|
}
|
||||||
export interface RepairKit {
|
export interface RepairKit {
|
||||||
armor: BonusSettings;
|
armor: BonusSettings;
|
||||||
weapon: BonusSettings;
|
weapon: BonusSettings;
|
||||||
|
@ -9,15 +9,6 @@ export declare class PlayerService {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
||||||
/**
|
|
||||||
* 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, useSkillProgressRateMultipler?: boolean): void;
|
|
||||||
/**
|
/**
|
||||||
* Get level of player
|
* Get level of player
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { QuestHelper } from "@spt-aki/helpers/QuestHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { RepairHelper } from "@spt-aki/helpers/RepairHelper";
|
import { RepairHelper } from "@spt-aki/helpers/RepairHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
@ -9,6 +9,7 @@ import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
|||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { RepairKitsInfo } from "@spt-aki/models/eft/repair/IRepairActionDataRequest";
|
import { RepairKitsInfo } from "@spt-aki/models/eft/repair/IRepairActionDataRequest";
|
||||||
import { RepairItem } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest";
|
import { RepairItem } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest";
|
||||||
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
import { BonusSettings, IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig";
|
import { BonusSettings, IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
@ -19,7 +20,7 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
|||||||
export declare class RepairService {
|
export declare class RepairService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected questHelper: QuestHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
@ -29,7 +30,7 @@ export declare class RepairService {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected repairConfig: IRepairConfig;
|
protected repairConfig: IRepairConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, profileHelper: ProfileHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Use trader to repair an items durability
|
* Use trader to repair an items durability
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -56,6 +57,12 @@ export declare class RepairService {
|
|||||||
* @param pmcData Profile to add points to
|
* @param pmcData Profile to add points to
|
||||||
*/
|
*/
|
||||||
addRepairSkillPoints(sessionId: string, repairDetails: RepairDetails, pmcData: IPmcData): void;
|
addRepairSkillPoints(sessionId: string, repairDetails: RepairDetails, pmcData: IPmcData): void;
|
||||||
|
/**
|
||||||
|
* Return an appromixation of the amount of skill points live would return for the given repairDetails
|
||||||
|
* @param repairDetails the repair details to calculate skill points for
|
||||||
|
* @returns the number of skill points to reward the user
|
||||||
|
*/
|
||||||
|
protected getWeaponRepairSkillPoints(repairDetails: RepairDetails): number;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -81,6 +88,13 @@ export declare class RepairService {
|
|||||||
* @returns Multiplier value
|
* @returns Multiplier value
|
||||||
*/
|
*/
|
||||||
protected getBonusMultiplierValue(skillBonusName: string, pmcData: IPmcData): number;
|
protected getBonusMultiplierValue(skillBonusName: string, pmcData: IPmcData): number;
|
||||||
|
/**
|
||||||
|
* Should a repair kit apply total durability loss on repair
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param applyRandomizeDurabilityLoss Value from repair config
|
||||||
|
* @returns True if loss should be applied
|
||||||
|
*/
|
||||||
|
protected shouldRepairKitApplyDurabilityLoss(pmcData: IPmcData, applyRandomizeDurabilityLoss: boolean): boolean;
|
||||||
/**
|
/**
|
||||||
* Update repair kits Resource object if it doesn't exist
|
* Update repair kits Resource object if it doesn't exist
|
||||||
* @param repairKitDetails Repair kit details from db
|
* @param repairKitDetails Repair kit details from db
|
||||||
@ -112,7 +126,7 @@ export declare class RepairService {
|
|||||||
* @param itemTemplate Item to check for skill
|
* @param itemTemplate Item to check for skill
|
||||||
* @returns Skill name
|
* @returns Skill name
|
||||||
*/
|
*/
|
||||||
protected getItemSkillType(itemTemplate: ITemplateItem): string;
|
protected getItemSkillType(itemTemplate: ITemplateItem): SkillTypes;
|
||||||
/**
|
/**
|
||||||
* Ensure multiplier is between 1 and 0.01
|
* Ensure multiplier is between 1 and 0.01
|
||||||
* @param receiveDurabilityMaxPercent Max durabiltiy percent
|
* @param receiveDurabilityMaxPercent Max durabiltiy percent
|
||||||
@ -123,6 +137,7 @@ export declare class RepairService {
|
|||||||
}
|
}
|
||||||
export declare class RepairDetails {
|
export declare class RepairDetails {
|
||||||
repairCost?: number;
|
repairCost?: number;
|
||||||
|
repairPoints?: number;
|
||||||
repairedItem: Item;
|
repairedItem: Item;
|
||||||
repairedItemIsArmor: boolean;
|
repairedItemIsArmor: boolean;
|
||||||
repairAmount: number;
|
repairAmount: number;
|
||||||
|
6
TypeScript/13AddTrader/types/utils/App.d.ts
vendored
6
TypeScript/13AddTrader/types/utils/App.d.ts
vendored
@ -1,6 +1,8 @@
|
|||||||
import { OnLoad } from "@spt-aki/di/OnLoad";
|
import { OnLoad } from "@spt-aki/di/OnLoad";
|
||||||
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
||||||
|
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { EncodingUtil } from "@spt-aki/utils/EncodingUtil";
|
import { EncodingUtil } from "@spt-aki/utils/EncodingUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -8,11 +10,13 @@ export declare class App {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
protected encodingUtil: EncodingUtil;
|
protected encodingUtil: EncodingUtil;
|
||||||
protected onLoadComponents: OnLoad[];
|
protected onLoadComponents: OnLoad[];
|
||||||
protected onUpdateComponents: OnUpdate[];
|
protected onUpdateComponents: OnUpdate[];
|
||||||
protected onUpdateLastRun: {};
|
protected onUpdateLastRun: {};
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, encodingUtil: EncodingUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]);
|
protected coreConfig: ICoreConfig;
|
||||||
|
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, configServer: ConfigServer, encodingUtil: EncodingUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]);
|
||||||
load(): Promise<void>;
|
load(): Promise<void>;
|
||||||
protected update(onUpdateComponents: OnUpdate[]): Promise<void>;
|
protected update(onUpdateComponents: OnUpdate[]): Promise<void>;
|
||||||
protected logUpdateException(err: any, updateable: OnUpdate): void;
|
protected logUpdateException(err: any, updateable: OnUpdate): void;
|
||||||
|
@ -61,6 +61,10 @@ export declare class GameController {
|
|||||||
* Handle client/game/start
|
* Handle client/game/start
|
||||||
*/
|
*/
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||||
|
/**
|
||||||
|
* Out of date/incorrectly made trader mods forget this data
|
||||||
|
*/
|
||||||
|
protected checkTraderRepairValuesExist(): void;
|
||||||
protected addCustomLooseLootPositions(): void;
|
protected addCustomLooseLootPositions(): void;
|
||||||
protected adjustLooseLootSpawnProbabilities(): void;
|
protected adjustLooseLootSpawnProbabilities(): void;
|
||||||
protected setHideoutAreasAndCraftsTo40Secs(): void;
|
protected setHideoutAreasAndCraftsTo40Secs(): void;
|
||||||
|
@ -8,7 +8,7 @@ import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGet
|
|||||||
import { IGetInsuranceCostResponseData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostResponseData";
|
import { IGetInsuranceCostResponseData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostResponseData";
|
||||||
import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData";
|
import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { Insurance, ISystemData } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { ISystemData, Insurance } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
|
@ -13,6 +13,7 @@ import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||||
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
@ -21,8 +22,9 @@ import { ObjectId } from "@spt-aki/utils/ObjectId";
|
|||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
export declare class RepeatableQuestController {
|
export declare class RepeatableQuestController {
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
@ -37,7 +39,7 @@ export declare class RepeatableQuestController {
|
|||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Handle client/repeatalbeQuests/activityPeriods
|
* Handle client/repeatalbeQuests/activityPeriods
|
||||||
* Returns an array of objects in the format of repeatable quests to the client.
|
* Returns an array of objects in the format of repeatable quests to the client.
|
||||||
@ -64,6 +66,13 @@ export declare class RepeatableQuestController {
|
|||||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
|
/**
|
||||||
|
* Get the number of quests to generate - takes into account charisma state of player
|
||||||
|
* @param repeatableConfig Config
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @returns Quest count
|
||||||
|
*/
|
||||||
|
protected getQuestCount(repeatableConfig: IRepeatableQuestConfig, pmcData: IPmcData): number;
|
||||||
/**
|
/**
|
||||||
* Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
|
* Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
|
||||||
* @param repeatableConfig daily/weekly config
|
* @param repeatableConfig daily/weekly config
|
||||||
|
@ -179,7 +179,7 @@ export declare class BotEquipmentModGenerator {
|
|||||||
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
||||||
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
||||||
* @param items The items where the CylinderMagazine's camora are appended to
|
* @param items The items where the CylinderMagazine's camora are appended to
|
||||||
* @param modPool modPool which should include available cartrigdes
|
* @param modPool modPool which should include available cartridges
|
||||||
* @param parentId The CylinderMagazine's UID
|
* @param parentId The CylinderMagazine's UID
|
||||||
* @param parentTemplate The CylinderMagazine's template
|
* @param parentTemplate The CylinderMagazine's template
|
||||||
*/
|
*/
|
||||||
|
@ -83,7 +83,7 @@ export declare class BotLootGenerator {
|
|||||||
* @param equipmentSlot slot to place the preset in (backpack)
|
* @param equipmentSlot slot to place the preset in (backpack)
|
||||||
* @param templateInventory bots template, assault.json
|
* @param templateInventory bots template, assault.json
|
||||||
* @param modChances chances for mods to spawn on weapon
|
* @param modChances chances for mods to spawn on weapon
|
||||||
* @param botRole bots role, .e.g. pmcBot
|
* @param botRole bots role .e.g. pmcBot
|
||||||
* @param isPmc are we generating for a pmc
|
* @param isPmc are we generating for a pmc
|
||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
@ -120,16 +120,16 @@ export declare class BotLootGenerator {
|
|||||||
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
||||||
/**
|
/**
|
||||||
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
||||||
* @param isPmc is this a PMC
|
* @param isPmc Is money on a PMC bot
|
||||||
* @param itemTemplate item details
|
* @param itemTemplate item details from db
|
||||||
* @param moneyItem Money stack to randomise
|
* @param moneyItem Money item to randomise
|
||||||
*/
|
*/
|
||||||
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
||||||
/**
|
/**
|
||||||
* Randomise the size of an ammo stack
|
* Randomise the size of an ammo stack
|
||||||
* @param isPmc is this a PMC
|
* @param isPmc Is ammo on a PMC bot
|
||||||
* @param itemTemplate item details
|
* @param itemTemplate item details from db
|
||||||
* @param ammoItem Ammo stack to randomise
|
* @param ammoItem Ammo item to randomise
|
||||||
*/
|
*/
|
||||||
protected randomiseAmmoStackSize(isPmc: boolean, itemTemplate: ITemplateItem, ammoItem: Item): void;
|
protected randomiseAmmoStackSize(isPmc: boolean, itemTemplate: ITemplateItem, ammoItem: Item): void;
|
||||||
/**
|
/**
|
||||||
|
@ -8,7 +8,7 @@ import { Exit } from "@spt-aki/models/eft/common/ILocationBase";
|
|||||||
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPickup, IRepeatableQuest, IReward, IRewards } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPickup, IRepeatableQuest, IReward, IRewards } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
import { IBaseQuestConfig, IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||||
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
@ -155,7 +155,7 @@ export declare class RepeatableQuestGenerator {
|
|||||||
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
||||||
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
||||||
*/
|
*/
|
||||||
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): IRewards;
|
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IRewards;
|
||||||
/**
|
/**
|
||||||
* Select a number of items that have a colelctive value of the passed in parameter
|
* Select a number of items that have a colelctive value of the passed in parameter
|
||||||
* @param repeatableConfig Config
|
* @param repeatableConfig Config
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Common, HideoutArea, IHideoutImprovement, Production, Productive } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { HideoutArea, IHideoutImprovement, Production, Productive } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea";
|
import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea";
|
||||||
import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
||||||
@ -201,22 +201,10 @@ export declare class HideoutHelper {
|
|||||||
* @returns coin slot count
|
* @returns coin slot count
|
||||||
*/
|
*/
|
||||||
protected getBTCSlots(pmcData: IPmcData): number;
|
protected getBTCSlots(pmcData: IPmcData): 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
|
* Get a count of bitcoins player miner can hold
|
||||||
*/
|
*/
|
||||||
protected getBitcoinMinerContainerSlotSize(): number;
|
protected getBitcoinMinerContainerSlotSize(): number;
|
||||||
/**
|
|
||||||
* Get the hideout management skill from player profile
|
|
||||||
* @param pmcData Profile to look at
|
|
||||||
* @returns Hideout management skill object
|
|
||||||
*/
|
|
||||||
protected getHideoutManagementSkill(pmcData: IPmcData): Common;
|
|
||||||
/**
|
/**
|
||||||
* HideoutManagement skill gives a consumption bonus the higher the level
|
* HideoutManagement skill gives a consumption bonus the higher the level
|
||||||
* 0.5% per level per 1-51, (25.5% at max)
|
* 0.5% per level per 1-51, (25.5% at max)
|
||||||
|
@ -7,6 +7,7 @@ import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService";
|
import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService";
|
||||||
|
import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
|
||||||
import { LocaleService } from "@spt-aki/services/LocaleService";
|
import { LocaleService } from "@spt-aki/services/LocaleService";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
@ -24,10 +25,11 @@ declare class ItemHelper {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected itemBaseClassService: ItemBaseClassService;
|
protected itemBaseClassService: ItemBaseClassService;
|
||||||
|
protected itemFilterService: ItemFilterService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected localeService: LocaleService;
|
protected localeService: LocaleService;
|
||||||
protected readonly defaultInvalidBaseTypes: string[];
|
protected readonly defaultInvalidBaseTypes: string[];
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, localisationService: LocalisationService, localeService: LocaleService);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService);
|
||||||
/**
|
/**
|
||||||
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
||||||
* @param {string} tpl the template id / tpl
|
* @param {string} tpl the template id / tpl
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { CounterKeyValue, Stats } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { Common, CounterKeyValue, Stats } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData";
|
import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData";
|
||||||
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService";
|
import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -19,7 +21,8 @@ export declare class ProfileHelper {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileSnapshotService: ProfileSnapshotService;
|
protected profileSnapshotService: ProfileSnapshotService;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService);
|
protected localisationService: LocalisationService;
|
||||||
|
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService);
|
||||||
/**
|
/**
|
||||||
* Remove/reset a completed quest condtion from players profile quest data
|
* Remove/reset a completed quest condtion from players profile quest data
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -101,4 +104,21 @@ export declare class ProfileHelper {
|
|||||||
* @param keyToIncrement Key
|
* @param keyToIncrement Key
|
||||||
*/
|
*/
|
||||||
incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void;
|
incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void;
|
||||||
|
/**
|
||||||
|
* Check if player has a skill at elite level
|
||||||
|
* @param skillType Skill to check
|
||||||
|
* @param pmcProfile Profile to find skill in
|
||||||
|
* @returns True if player has skill at elite level
|
||||||
|
*/
|
||||||
|
hasEliteSkillLevel(skillType: SkillTypes, pmcProfile: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Add points to a specific skill in player profile
|
||||||
|
* @param skill Skill to add points to
|
||||||
|
* @param pointsToAdd Points to add
|
||||||
|
* @param pmcProfile Player profile with skill
|
||||||
|
* @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
addSkillPointsToPlayer(pmcProfile: IPmcData, skill: SkillTypes, pointsToAdd: number, useSkillProgressRateMultipler?: boolean): void;
|
||||||
|
getSkillFromProfile(pmcData: IPmcData, skill: SkillTypes): Common;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import { QuestConditionHelper } from "@spt-aki/helpers/QuestConditionHelper";
|
|||||||
import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { Common, IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "@spt-aki/models/eft/common/tables/IQuest";
|
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "@spt-aki/models/eft/common/tables/IQuest";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
@ -66,14 +66,12 @@ export declare class QuestHelper {
|
|||||||
*/
|
*/
|
||||||
getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[];
|
getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[];
|
||||||
/**
|
/**
|
||||||
* Increase skill points of a skill on player profile
|
* Adjust skill experience for low skill levels, mimicing the official client
|
||||||
* Dupe of PlayerService.incrementSkillLevel()
|
* @param profileSkill the skill experience is being added to
|
||||||
* @param sessionID Session id
|
* @param progressAmount the amount of experience being added to the skill
|
||||||
* @param pmcData Player profile
|
* @returns the adjusted skill progress gain
|
||||||
* @param skillName Name of skill to increase skill points of
|
|
||||||
* @param progressAmount Amount of skill points to add to skill
|
|
||||||
*/
|
*/
|
||||||
rewardSkillPoints(sessionID: string, pmcData: IPmcData, skillName: string, progressAmount: number): void;
|
adjustSkillExpForLowLevels(profileSkill: Common, progressAmount: number): number;
|
||||||
/**
|
/**
|
||||||
* Get quest name by quest id
|
* Get quest name by quest id
|
||||||
* @param questId id to get
|
* @param questId id to get
|
||||||
|
@ -29,7 +29,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected imported: Record<string, IPackageJsonData>;
|
protected imported: Record<string, IPackageJsonData>;
|
||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
protected serverDependencies: Record<string, string>;
|
protected serverDependencies: Record<string, string>;
|
||||||
protected skippedMods: string[];
|
protected skippedMods: Set<string>;
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modLoadOrder: ModLoadOrder, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modLoadOrder: ModLoadOrder, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
@ -44,27 +44,22 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected sortMods(prev: string, next: string, missingFromOrderJSON: Record<string, boolean>): number;
|
protected sortMods(prev: string, next: string, missingFromOrderJSON: Record<string, boolean>): number;
|
||||||
/**
|
/**
|
||||||
* Check for duplicate mods loaded, show error if any
|
* Check for duplicate mods loaded, show error if any
|
||||||
* @param modPackageData Dictionary of mod package.json data
|
* @param modPackageData map of mod package.json data
|
||||||
*/
|
*/
|
||||||
protected checkForDuplicateMods(modPackageData: Record<string, IPackageJsonData>): void;
|
protected checkForDuplicateMods(modPackageData: Map<string, IPackageJsonData>): void;
|
||||||
/**
|
/**
|
||||||
* Check for and return duplicate strings inside an array
|
* Returns an array of valid mods.
|
||||||
* @param stringArray Array to check for duplicates
|
*
|
||||||
* @returns string array of duplicates, empty if none found
|
|
||||||
*/
|
|
||||||
protected getDuplicates(stringArray: string[]): string[];
|
|
||||||
/**
|
|
||||||
* Get an array of mods with errors that prevent them from working with SPT
|
|
||||||
* @param mods mods to validate
|
* @param mods mods to validate
|
||||||
* @returns Mod names as array
|
* @returns array of mod folder names
|
||||||
*/
|
*/
|
||||||
protected getBrokenMods(mods: string[]): string[];
|
protected getValidMods(mods: string[]): string[];
|
||||||
/**
|
/**
|
||||||
* Get packageJson data for mods
|
* Get packageJson data for mods
|
||||||
* @param mods mods to get packageJson for
|
* @param mods mods to get packageJson for
|
||||||
* @returns dictionary <modName - package.json>
|
* @returns map <modFolderName - package.json>
|
||||||
*/
|
*/
|
||||||
protected getModsPackageData(mods: string[]): Record<string, IPackageJsonData>;
|
protected getModsPackageData(mods: string[]): Map<string, IPackageJsonData>;
|
||||||
/**
|
/**
|
||||||
* Is the passed in mod compatible with the running server version
|
* Is the passed in mod compatible with the running server version
|
||||||
* @param mod Mod to check compatibiltiy with AKI
|
* @param mod Mod to check compatibiltiy with AKI
|
||||||
@ -86,10 +81,17 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
* Compile mod and add into class property "imported"
|
* Compile mod and add into class property "imported"
|
||||||
* @param mod Name of mod to compile/add
|
* @param mod Name of mod to compile/add
|
||||||
*/
|
*/
|
||||||
protected addModAsync(mod: string): Promise<void>;
|
protected addModAsync(mod: string, pkg: IPackageJsonData): Promise<void>;
|
||||||
|
/**
|
||||||
|
* Checks if a given mod should be loaded or skipped.
|
||||||
|
*
|
||||||
|
* @param pkg mod package.json data
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected shouldSkipMod(pkg: IPackageJsonData): boolean;
|
||||||
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
protected autoInstallDependencies(modPath: string, pkg: IPackageJsonData): void;
|
||||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Map<string, IPackageJsonData>): boolean;
|
||||||
protected isModCompatible(mod: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
protected isModCompatible(mod: IPackageJsonData, loadedMods: Map<string, IPackageJsonData>): boolean;
|
||||||
/**
|
/**
|
||||||
* Validate a mod passes a number of checks
|
* Validate a mod passes a number of checks
|
||||||
* @param modName name of mod in /mods/ to validate
|
* @param modName name of mod in /mods/ to validate
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
export declare enum SkillTypes {
|
export declare enum SkillTypes {
|
||||||
|
BOT_RELOAD = "BotReload",
|
||||||
|
BOT_SOUND = "BotSound",
|
||||||
HIDEOUT_MANAGEMENT = "HideoutManagement",
|
HIDEOUT_MANAGEMENT = "HideoutManagement",
|
||||||
CRAFTING = "Crafting",
|
CRAFTING = "Crafting",
|
||||||
METABOLISM = "Metabolism",
|
METABOLISM = "Metabolism",
|
||||||
@ -19,6 +21,7 @@ export declare enum SkillTypes {
|
|||||||
ATTENTION = "Attention",
|
ATTENTION = "Attention",
|
||||||
CHARISMA = "Charisma",
|
CHARISMA = "Charisma",
|
||||||
MEMORY = "Memory",
|
MEMORY = "Memory",
|
||||||
|
MELEE = "Melee",
|
||||||
SURGERY = "Surgery",
|
SURGERY = "Surgery",
|
||||||
AIM_DRILLS = "AimDrills",
|
AIM_DRILLS = "AimDrills",
|
||||||
TROUBLESHOOTING = "TroubleShooting",
|
TROUBLESHOOTING = "TroubleShooting",
|
||||||
@ -31,6 +34,7 @@ export declare enum SkillTypes {
|
|||||||
NIGHT_OPS = "NightOps",
|
NIGHT_OPS = "NightOps",
|
||||||
SILENT_OPS = "SilentOps",
|
SILENT_OPS = "SilentOps",
|
||||||
LOCKPICKING = "Lockpicking",
|
LOCKPICKING = "Lockpicking",
|
||||||
|
/** Also called Weapon Maintenance*/
|
||||||
WEAPON_TREATMENT = "WeaponTreatment",
|
WEAPON_TREATMENT = "WeaponTreatment",
|
||||||
MAG_DRILLS = "MagDrills",
|
MAG_DRILLS = "MagDrills",
|
||||||
FREE_TRADING = "Freetrading",
|
FREE_TRADING = "Freetrading",
|
||||||
|
@ -102,6 +102,8 @@ export interface EquipmentFilters {
|
|||||||
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[];
|
||||||
/** Same as weightingAdjustments but based on player level instead of bot level */
|
/** Same as weightingAdjustments but based on player level instead of bot level */
|
||||||
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[];
|
||||||
|
/** Should the stock mod be forced to spawn on bot */
|
||||||
|
forceStock: boolean;
|
||||||
}
|
}
|
||||||
export interface ModLimits {
|
export interface ModLimits {
|
||||||
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
||||||
|
@ -55,6 +55,8 @@ export interface IRewardScaling {
|
|||||||
items: number[];
|
items: number[];
|
||||||
reputation: number[];
|
reputation: number[];
|
||||||
rewardSpread: number;
|
rewardSpread: number;
|
||||||
|
skillRewardChance: number[];
|
||||||
|
skillPointReward: number[];
|
||||||
}
|
}
|
||||||
export interface ITraderWhitelist {
|
export interface ITraderWhitelist {
|
||||||
traderId: string;
|
traderId: string;
|
||||||
@ -66,7 +68,7 @@ export interface IRepeatableQuestTypesConfig {
|
|||||||
Pickup: IPickup;
|
Pickup: IPickup;
|
||||||
Elimination: IEliminationConfig[];
|
Elimination: IEliminationConfig[];
|
||||||
}
|
}
|
||||||
export interface IExploration {
|
export interface IExploration extends IBaseQuestConfig {
|
||||||
maxExtracts: number;
|
maxExtracts: number;
|
||||||
specificExits: ISpecificExits;
|
specificExits: ISpecificExits;
|
||||||
}
|
}
|
||||||
@ -74,7 +76,7 @@ export interface ISpecificExits {
|
|||||||
probability: number;
|
probability: number;
|
||||||
passageRequirementWhitelist: string[];
|
passageRequirementWhitelist: string[];
|
||||||
}
|
}
|
||||||
export interface ICompletion {
|
export interface ICompletion extends IBaseQuestConfig {
|
||||||
minRequestedAmount: number;
|
minRequestedAmount: number;
|
||||||
maxRequestedAmount: number;
|
maxRequestedAmount: number;
|
||||||
minRequestedBulletAmount: number;
|
minRequestedBulletAmount: number;
|
||||||
@ -82,7 +84,7 @@ export interface ICompletion {
|
|||||||
useWhitelist: boolean;
|
useWhitelist: boolean;
|
||||||
useBlacklist: boolean;
|
useBlacklist: boolean;
|
||||||
}
|
}
|
||||||
export interface IPickup {
|
export interface IPickup extends IBaseQuestConfig {
|
||||||
ItemTypeToFetchWithMaxCount: IPickupTypeWithMaxCount[];
|
ItemTypeToFetchWithMaxCount: IPickupTypeWithMaxCount[];
|
||||||
}
|
}
|
||||||
export interface IPickupTypeWithMaxCount {
|
export interface IPickupTypeWithMaxCount {
|
||||||
@ -90,7 +92,7 @@ export interface IPickupTypeWithMaxCount {
|
|||||||
maxPickupCount: number;
|
maxPickupCount: number;
|
||||||
minPickupCount: number;
|
minPickupCount: number;
|
||||||
}
|
}
|
||||||
export interface IEliminationConfig {
|
export interface IEliminationConfig extends IBaseQuestConfig {
|
||||||
levelRange: MinMax;
|
levelRange: MinMax;
|
||||||
targets: ITarget[];
|
targets: ITarget[];
|
||||||
bodyPartProb: number;
|
bodyPartProb: number;
|
||||||
@ -111,6 +113,9 @@ export interface IEliminationConfig {
|
|||||||
weaponRequirementProb: number;
|
weaponRequirementProb: number;
|
||||||
weaponRequirements: IWeaponRequirement[];
|
weaponRequirements: IWeaponRequirement[];
|
||||||
}
|
}
|
||||||
|
export interface IBaseQuestConfig {
|
||||||
|
possibleSkillRewards: string[];
|
||||||
|
}
|
||||||
export interface ITarget extends IProbabilityObject {
|
export interface ITarget extends IProbabilityObject {
|
||||||
data: IBossInfo;
|
data: IBossInfo;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ export interface IRepairConfig extends IBaseConfig {
|
|||||||
/** INT gain multiplier per repaired item type */
|
/** INT gain multiplier per repaired item type */
|
||||||
repairKitIntellectGainMultiplier: IIntellectGainValues;
|
repairKitIntellectGainMultiplier: IIntellectGainValues;
|
||||||
maxIntellectGainPerRepair: IMaxIntellectGainValues;
|
maxIntellectGainPerRepair: IMaxIntellectGainValues;
|
||||||
|
weaponTreatment: IWeaponTreatmentRepairValues;
|
||||||
repairKit: RepairKit;
|
repairKit: RepairKit;
|
||||||
}
|
}
|
||||||
export interface IIntellectGainValues {
|
export interface IIntellectGainValues {
|
||||||
@ -19,6 +20,16 @@ export interface IMaxIntellectGainValues {
|
|||||||
kit: number;
|
kit: number;
|
||||||
trader: number;
|
trader: number;
|
||||||
}
|
}
|
||||||
|
export interface IWeaponTreatmentRepairValues {
|
||||||
|
/** The chance to gain more weapon maintenance skill */
|
||||||
|
critSuccessChance: number;
|
||||||
|
critSuccessAmount: number;
|
||||||
|
/** The chance to gain less weapon maintenance skill */
|
||||||
|
critFailureChance: number;
|
||||||
|
critFailureAmount: number;
|
||||||
|
/** The multiplier used for calculating weapon maintenance XP */
|
||||||
|
pointGainMultiplier: number;
|
||||||
|
}
|
||||||
export interface RepairKit {
|
export interface RepairKit {
|
||||||
armor: BonusSettings;
|
armor: BonusSettings;
|
||||||
weapon: BonusSettings;
|
weapon: BonusSettings;
|
||||||
|
@ -9,15 +9,6 @@ export declare class PlayerService {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
||||||
/**
|
|
||||||
* 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, useSkillProgressRateMultipler?: boolean): void;
|
|
||||||
/**
|
/**
|
||||||
* Get level of player
|
* Get level of player
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { QuestHelper } from "@spt-aki/helpers/QuestHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { RepairHelper } from "@spt-aki/helpers/RepairHelper";
|
import { RepairHelper } from "@spt-aki/helpers/RepairHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
@ -9,6 +9,7 @@ import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
|||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { RepairKitsInfo } from "@spt-aki/models/eft/repair/IRepairActionDataRequest";
|
import { RepairKitsInfo } from "@spt-aki/models/eft/repair/IRepairActionDataRequest";
|
||||||
import { RepairItem } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest";
|
import { RepairItem } from "@spt-aki/models/eft/repair/ITraderRepairActionDataRequest";
|
||||||
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
import { BonusSettings, IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig";
|
import { BonusSettings, IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
@ -19,7 +20,7 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
|||||||
export declare class RepairService {
|
export declare class RepairService {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected questHelper: QuestHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
@ -29,7 +30,7 @@ export declare class RepairService {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected repairConfig: IRepairConfig;
|
protected repairConfig: IRepairConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, questHelper: QuestHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, profileHelper: ProfileHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, traderHelper: TraderHelper, weightedRandomHelper: WeightedRandomHelper, paymentService: PaymentService, repairHelper: RepairHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Use trader to repair an items durability
|
* Use trader to repair an items durability
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -56,6 +57,12 @@ export declare class RepairService {
|
|||||||
* @param pmcData Profile to add points to
|
* @param pmcData Profile to add points to
|
||||||
*/
|
*/
|
||||||
addRepairSkillPoints(sessionId: string, repairDetails: RepairDetails, pmcData: IPmcData): void;
|
addRepairSkillPoints(sessionId: string, repairDetails: RepairDetails, pmcData: IPmcData): void;
|
||||||
|
/**
|
||||||
|
* Return an appromixation of the amount of skill points live would return for the given repairDetails
|
||||||
|
* @param repairDetails the repair details to calculate skill points for
|
||||||
|
* @returns the number of skill points to reward the user
|
||||||
|
*/
|
||||||
|
protected getWeaponRepairSkillPoints(repairDetails: RepairDetails): number;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -81,6 +88,13 @@ export declare class RepairService {
|
|||||||
* @returns Multiplier value
|
* @returns Multiplier value
|
||||||
*/
|
*/
|
||||||
protected getBonusMultiplierValue(skillBonusName: string, pmcData: IPmcData): number;
|
protected getBonusMultiplierValue(skillBonusName: string, pmcData: IPmcData): number;
|
||||||
|
/**
|
||||||
|
* Should a repair kit apply total durability loss on repair
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param applyRandomizeDurabilityLoss Value from repair config
|
||||||
|
* @returns True if loss should be applied
|
||||||
|
*/
|
||||||
|
protected shouldRepairKitApplyDurabilityLoss(pmcData: IPmcData, applyRandomizeDurabilityLoss: boolean): boolean;
|
||||||
/**
|
/**
|
||||||
* Update repair kits Resource object if it doesn't exist
|
* Update repair kits Resource object if it doesn't exist
|
||||||
* @param repairKitDetails Repair kit details from db
|
* @param repairKitDetails Repair kit details from db
|
||||||
@ -112,7 +126,7 @@ export declare class RepairService {
|
|||||||
* @param itemTemplate Item to check for skill
|
* @param itemTemplate Item to check for skill
|
||||||
* @returns Skill name
|
* @returns Skill name
|
||||||
*/
|
*/
|
||||||
protected getItemSkillType(itemTemplate: ITemplateItem): string;
|
protected getItemSkillType(itemTemplate: ITemplateItem): SkillTypes;
|
||||||
/**
|
/**
|
||||||
* Ensure multiplier is between 1 and 0.01
|
* Ensure multiplier is between 1 and 0.01
|
||||||
* @param receiveDurabilityMaxPercent Max durabiltiy percent
|
* @param receiveDurabilityMaxPercent Max durabiltiy percent
|
||||||
@ -123,6 +137,7 @@ export declare class RepairService {
|
|||||||
}
|
}
|
||||||
export declare class RepairDetails {
|
export declare class RepairDetails {
|
||||||
repairCost?: number;
|
repairCost?: number;
|
||||||
|
repairPoints?: number;
|
||||||
repairedItem: Item;
|
repairedItem: Item;
|
||||||
repairedItemIsArmor: boolean;
|
repairedItemIsArmor: boolean;
|
||||||
repairAmount: number;
|
repairAmount: number;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { OnLoad } from "@spt-aki/di/OnLoad";
|
import { OnLoad } from "@spt-aki/di/OnLoad";
|
||||||
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
||||||
|
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { EncodingUtil } from "@spt-aki/utils/EncodingUtil";
|
import { EncodingUtil } from "@spt-aki/utils/EncodingUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -8,11 +10,13 @@ export declare class App {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
protected encodingUtil: EncodingUtil;
|
protected encodingUtil: EncodingUtil;
|
||||||
protected onLoadComponents: OnLoad[];
|
protected onLoadComponents: OnLoad[];
|
||||||
protected onUpdateComponents: OnUpdate[];
|
protected onUpdateComponents: OnUpdate[];
|
||||||
protected onUpdateLastRun: {};
|
protected onUpdateLastRun: {};
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, encodingUtil: EncodingUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]);
|
protected coreConfig: ICoreConfig;
|
||||||
|
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, configServer: ConfigServer, encodingUtil: EncodingUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]);
|
||||||
load(): Promise<void>;
|
load(): Promise<void>;
|
||||||
protected update(onUpdateComponents: OnUpdate[]): Promise<void>;
|
protected update(onUpdateComponents: OnUpdate[]): Promise<void>;
|
||||||
protected logUpdateException(err: any, updateable: OnUpdate): void;
|
protected logUpdateException(err: any, updateable: OnUpdate): void;
|
||||||
|
@ -61,6 +61,10 @@ export declare class GameController {
|
|||||||
* Handle client/game/start
|
* Handle client/game/start
|
||||||
*/
|
*/
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||||
|
/**
|
||||||
|
* Out of date/incorrectly made trader mods forget this data
|
||||||
|
*/
|
||||||
|
protected checkTraderRepairValuesExist(): void;
|
||||||
protected addCustomLooseLootPositions(): void;
|
protected addCustomLooseLootPositions(): void;
|
||||||
protected adjustLooseLootSpawnProbabilities(): void;
|
protected adjustLooseLootSpawnProbabilities(): void;
|
||||||
protected setHideoutAreasAndCraftsTo40Secs(): void;
|
protected setHideoutAreasAndCraftsTo40Secs(): void;
|
||||||
|
@ -8,7 +8,7 @@ import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGet
|
|||||||
import { IGetInsuranceCostResponseData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostResponseData";
|
import { IGetInsuranceCostResponseData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostResponseData";
|
||||||
import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData";
|
import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { Insurance, ISystemData } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { ISystemData, Insurance } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
|
@ -13,6 +13,7 @@ import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||||
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
@ -21,8 +22,9 @@ import { ObjectId } from "@spt-aki/utils/ObjectId";
|
|||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
export declare class RepeatableQuestController {
|
export declare class RepeatableQuestController {
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
@ -37,7 +39,7 @@ export declare class RepeatableQuestController {
|
|||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Handle client/repeatalbeQuests/activityPeriods
|
* Handle client/repeatalbeQuests/activityPeriods
|
||||||
* Returns an array of objects in the format of repeatable quests to the client.
|
* Returns an array of objects in the format of repeatable quests to the client.
|
||||||
@ -64,6 +66,13 @@ export declare class RepeatableQuestController {
|
|||||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
|
/**
|
||||||
|
* Get the number of quests to generate - takes into account charisma state of player
|
||||||
|
* @param repeatableConfig Config
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @returns Quest count
|
||||||
|
*/
|
||||||
|
protected getQuestCount(repeatableConfig: IRepeatableQuestConfig, pmcData: IPmcData): number;
|
||||||
/**
|
/**
|
||||||
* Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
|
* Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
|
||||||
* @param repeatableConfig daily/weekly config
|
* @param repeatableConfig daily/weekly config
|
||||||
|
@ -179,7 +179,7 @@ export declare class BotEquipmentModGenerator {
|
|||||||
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
||||||
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
||||||
* @param items The items where the CylinderMagazine's camora are appended to
|
* @param items The items where the CylinderMagazine's camora are appended to
|
||||||
* @param modPool modPool which should include available cartrigdes
|
* @param modPool modPool which should include available cartridges
|
||||||
* @param parentId The CylinderMagazine's UID
|
* @param parentId The CylinderMagazine's UID
|
||||||
* @param parentTemplate The CylinderMagazine's template
|
* @param parentTemplate The CylinderMagazine's template
|
||||||
*/
|
*/
|
||||||
|
@ -83,7 +83,7 @@ export declare class BotLootGenerator {
|
|||||||
* @param equipmentSlot slot to place the preset in (backpack)
|
* @param equipmentSlot slot to place the preset in (backpack)
|
||||||
* @param templateInventory bots template, assault.json
|
* @param templateInventory bots template, assault.json
|
||||||
* @param modChances chances for mods to spawn on weapon
|
* @param modChances chances for mods to spawn on weapon
|
||||||
* @param botRole bots role, .e.g. pmcBot
|
* @param botRole bots role .e.g. pmcBot
|
||||||
* @param isPmc are we generating for a pmc
|
* @param isPmc are we generating for a pmc
|
||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
@ -120,16 +120,16 @@ export declare class BotLootGenerator {
|
|||||||
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
||||||
/**
|
/**
|
||||||
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
||||||
* @param isPmc is this a PMC
|
* @param isPmc Is money on a PMC bot
|
||||||
* @param itemTemplate item details
|
* @param itemTemplate item details from db
|
||||||
* @param moneyItem Money stack to randomise
|
* @param moneyItem Money item to randomise
|
||||||
*/
|
*/
|
||||||
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
||||||
/**
|
/**
|
||||||
* Randomise the size of an ammo stack
|
* Randomise the size of an ammo stack
|
||||||
* @param isPmc is this a PMC
|
* @param isPmc Is ammo on a PMC bot
|
||||||
* @param itemTemplate item details
|
* @param itemTemplate item details from db
|
||||||
* @param ammoItem Ammo stack to randomise
|
* @param ammoItem Ammo item to randomise
|
||||||
*/
|
*/
|
||||||
protected randomiseAmmoStackSize(isPmc: boolean, itemTemplate: ITemplateItem, ammoItem: Item): void;
|
protected randomiseAmmoStackSize(isPmc: boolean, itemTemplate: ITemplateItem, ammoItem: Item): void;
|
||||||
/**
|
/**
|
||||||
|
@ -8,7 +8,7 @@ import { Exit } from "@spt-aki/models/eft/common/ILocationBase";
|
|||||||
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPickup, IRepeatableQuest, IReward, IRewards } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPickup, IRepeatableQuest, IReward, IRewards } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
import { IBaseQuestConfig, IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||||
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
@ -155,7 +155,7 @@ export declare class RepeatableQuestGenerator {
|
|||||||
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
||||||
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
||||||
*/
|
*/
|
||||||
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): IRewards;
|
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IRewards;
|
||||||
/**
|
/**
|
||||||
* Select a number of items that have a colelctive value of the passed in parameter
|
* Select a number of items that have a colelctive value of the passed in parameter
|
||||||
* @param repeatableConfig Config
|
* @param repeatableConfig Config
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Common, HideoutArea, IHideoutImprovement, Production, Productive } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { HideoutArea, IHideoutImprovement, Production, Productive } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea";
|
import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea";
|
||||||
import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
||||||
@ -201,22 +201,10 @@ export declare class HideoutHelper {
|
|||||||
* @returns coin slot count
|
* @returns coin slot count
|
||||||
*/
|
*/
|
||||||
protected getBTCSlots(pmcData: IPmcData): number;
|
protected getBTCSlots(pmcData: IPmcData): 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
|
* Get a count of bitcoins player miner can hold
|
||||||
*/
|
*/
|
||||||
protected getBitcoinMinerContainerSlotSize(): number;
|
protected getBitcoinMinerContainerSlotSize(): number;
|
||||||
/**
|
|
||||||
* Get the hideout management skill from player profile
|
|
||||||
* @param pmcData Profile to look at
|
|
||||||
* @returns Hideout management skill object
|
|
||||||
*/
|
|
||||||
protected getHideoutManagementSkill(pmcData: IPmcData): Common;
|
|
||||||
/**
|
/**
|
||||||
* HideoutManagement skill gives a consumption bonus the higher the level
|
* HideoutManagement skill gives a consumption bonus the higher the level
|
||||||
* 0.5% per level per 1-51, (25.5% at max)
|
* 0.5% per level per 1-51, (25.5% at max)
|
||||||
|
@ -7,6 +7,7 @@ import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService";
|
import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService";
|
||||||
|
import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
|
||||||
import { LocaleService } from "@spt-aki/services/LocaleService";
|
import { LocaleService } from "@spt-aki/services/LocaleService";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
@ -24,10 +25,11 @@ declare class ItemHelper {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected itemBaseClassService: ItemBaseClassService;
|
protected itemBaseClassService: ItemBaseClassService;
|
||||||
|
protected itemFilterService: ItemFilterService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected localeService: LocaleService;
|
protected localeService: LocaleService;
|
||||||
protected readonly defaultInvalidBaseTypes: string[];
|
protected readonly defaultInvalidBaseTypes: string[];
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, localisationService: LocalisationService, localeService: LocaleService);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService);
|
||||||
/**
|
/**
|
||||||
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
||||||
* @param {string} tpl the template id / tpl
|
* @param {string} tpl the template id / tpl
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { CounterKeyValue, Stats } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { Common, CounterKeyValue, Stats } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData";
|
import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData";
|
||||||
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService";
|
import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -19,7 +21,8 @@ export declare class ProfileHelper {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileSnapshotService: ProfileSnapshotService;
|
protected profileSnapshotService: ProfileSnapshotService;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService);
|
protected localisationService: LocalisationService;
|
||||||
|
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService);
|
||||||
/**
|
/**
|
||||||
* Remove/reset a completed quest condtion from players profile quest data
|
* Remove/reset a completed quest condtion from players profile quest data
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -101,4 +104,21 @@ export declare class ProfileHelper {
|
|||||||
* @param keyToIncrement Key
|
* @param keyToIncrement Key
|
||||||
*/
|
*/
|
||||||
incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void;
|
incrementStatCounter(counters: CounterKeyValue[], keyToIncrement: string): void;
|
||||||
|
/**
|
||||||
|
* Check if player has a skill at elite level
|
||||||
|
* @param skillType Skill to check
|
||||||
|
* @param pmcProfile Profile to find skill in
|
||||||
|
* @returns True if player has skill at elite level
|
||||||
|
*/
|
||||||
|
hasEliteSkillLevel(skillType: SkillTypes, pmcProfile: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Add points to a specific skill in player profile
|
||||||
|
* @param skill Skill to add points to
|
||||||
|
* @param pointsToAdd Points to add
|
||||||
|
* @param pmcProfile Player profile with skill
|
||||||
|
* @param useSkillProgressRateMultipler Skills are multiplied by a value in globals, default is off to maintain compatibility with legacy code
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
addSkillPointsToPlayer(pmcProfile: IPmcData, skill: SkillTypes, pointsToAdd: number, useSkillProgressRateMultipler?: boolean): void;
|
||||||
|
getSkillFromProfile(pmcData: IPmcData, skill: SkillTypes): Common;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ import { QuestConditionHelper } from "@spt-aki/helpers/QuestConditionHelper";
|
|||||||
import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { Common, IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "@spt-aki/models/eft/common/tables/IQuest";
|
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "@spt-aki/models/eft/common/tables/IQuest";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
@ -66,14 +66,12 @@ export declare class QuestHelper {
|
|||||||
*/
|
*/
|
||||||
getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[];
|
getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[];
|
||||||
/**
|
/**
|
||||||
* Increase skill points of a skill on player profile
|
* Adjust skill experience for low skill levels, mimicing the official client
|
||||||
* Dupe of PlayerService.incrementSkillLevel()
|
* @param profileSkill the skill experience is being added to
|
||||||
* @param sessionID Session id
|
* @param progressAmount the amount of experience being added to the skill
|
||||||
* @param pmcData Player profile
|
* @returns the adjusted skill progress gain
|
||||||
* @param skillName Name of skill to increase skill points of
|
|
||||||
* @param progressAmount Amount of skill points to add to skill
|
|
||||||
*/
|
*/
|
||||||
rewardSkillPoints(sessionID: string, pmcData: IPmcData, skillName: string, progressAmount: number): void;
|
adjustSkillExpForLowLevels(profileSkill: Common, progressAmount: number): number;
|
||||||
/**
|
/**
|
||||||
* Get quest name by quest id
|
* Get quest name by quest id
|
||||||
* @param questId id to get
|
* @param questId id to get
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user