Update types for 3.5.6
This commit is contained in:
parent
81b0cd7872
commit
e72f313d88
@ -1,7 +1,7 @@
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { ISuit } from "../models/eft/common/tables/ITrader";
|
||||
import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
||||
import { ClothingItem, IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
||||
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -18,7 +18,32 @@ export declare class CustomizationController {
|
||||
protected profileHelper: ProfileHelper;
|
||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
||||
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
||||
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
|
||||
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
|
||||
/**
|
||||
* Has an outfit been purchased by a player
|
||||
* @param suitId clothing id
|
||||
* @param sessionID Session id
|
||||
* @returns true/false
|
||||
*/
|
||||
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
|
||||
/**
|
||||
* Update output object and player profile with purchase details
|
||||
* @param sessionId Session id
|
||||
* @param pmcData Player profile
|
||||
* @param clothingItems Clothing purchased
|
||||
* @param output Client response
|
||||
*/
|
||||
protected payForClothingItems(sessionId: string, pmcData: IPmcData, clothingItems: ClothingItem[], output: IItemEventRouterResponse): void;
|
||||
/**
|
||||
* Update output object and player profile with purchase details for single piece of clothing
|
||||
* @param sessionId Session id
|
||||
* @param pmcData Player profile
|
||||
* @param clothingItem Clothing item purchased
|
||||
* @param output Client response
|
||||
* @returns
|
||||
*/
|
||||
protected payForClothingItem(sessionId: string, pmcData: IPmcData, clothingItem: ClothingItem, output: IItemEventRouterResponse): void;
|
||||
protected getAllTraderSuits(sessionID: string): ISuit[];
|
||||
}
|
||||
|
@ -73,8 +73,20 @@ export declare class DialogueController {
|
||||
*/
|
||||
protected getMessagesWithAttachments(messages: Message[]): Message[];
|
||||
/**
|
||||
* Delete expired items. triggers when updating traders.
|
||||
* @param sessionID Session id
|
||||
* Delete expired items from all messages in player profile. triggers when updating traders.
|
||||
* @param sessionId Session id
|
||||
*/
|
||||
protected removeExpiredItems(sessionID: string): void;
|
||||
protected removeExpiredItemsFromMessages(sessionId: string): void;
|
||||
/**
|
||||
* Removes expired items from a message in player profile
|
||||
* @param sessionId Session id
|
||||
* @param dialogueId Dialog id
|
||||
*/
|
||||
protected removeExpiredItemsFromMessage(sessionId: string, dialogueId: string): void;
|
||||
/**
|
||||
* Has a dialog message expired
|
||||
* @param message Message to check expiry of
|
||||
* @returns true or false
|
||||
*/
|
||||
protected messageHasExpired(message: Message): boolean;
|
||||
}
|
||||
|
@ -137,9 +137,9 @@ export declare class HideoutController {
|
||||
* Add generated scav case rewards to player profile
|
||||
* @param pmcData player profile to add rewards to
|
||||
* @param rewards reward items to add to profile
|
||||
* @param recipieId recipie id to save into Production dict
|
||||
* @param recipeId recipe id to save into Production dict
|
||||
*/
|
||||
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[], recipieId: string): void;
|
||||
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[], recipeId: string): void;
|
||||
/**
|
||||
* Start production of continuously created item
|
||||
* @param pmcData Player profile
|
||||
@ -157,15 +157,15 @@ export declare class HideoutController {
|
||||
*/
|
||||
takeProduction(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Take recipie-type production out of hideout area and place into player inventory
|
||||
* Take recipe-type production out of hideout area and place into player inventory
|
||||
* @param sessionID Session id
|
||||
* @param recipe Completed recipie of item
|
||||
* @param recipe Completed recipe of item
|
||||
* @param pmcData Player profile
|
||||
* @param request Remove production from area request
|
||||
* @param output Output object to update
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
protected handleRecipe(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles giving rewards stored in player profile to player after clicking 'get rewards'
|
||||
* @param sessionID Session id
|
||||
|
@ -53,5 +53,25 @@ export declare class MatchController {
|
||||
* @returns bot difficulty
|
||||
*/
|
||||
protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string;
|
||||
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
|
||||
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void;
|
||||
/**
|
||||
* Is extract by car
|
||||
* @param extractName name of extract
|
||||
* @returns true if car extract
|
||||
*/
|
||||
protected extractWasViaCar(extractName: string): boolean;
|
||||
/**
|
||||
* Handle when a player extracts using a car - Add rep to fence
|
||||
* @param extractName name of the extract used
|
||||
* @param pmcData Player profile
|
||||
* @param sessionId Session id
|
||||
*/
|
||||
protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void;
|
||||
/**
|
||||
* Update players fence trader standing value in profile
|
||||
* @param pmcData Player profile
|
||||
* @param fenceId Id of fence trader
|
||||
* @param extractName Name of extract used
|
||||
*/
|
||||
protected updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void;
|
||||
}
|
||||
|
@ -117,7 +117,35 @@ export declare class RagfairController {
|
||||
* @returns min/avg/max values for an item based on flea offers available
|
||||
*/
|
||||
getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult;
|
||||
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* List item(s) on flea for sale
|
||||
* @param pmcData Player profile
|
||||
* @param offerRequest Flea list creatio offer
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
addPlayerOffer(pmcData: IPmcData, offerRequest: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Is the item to be listed on the flea valid
|
||||
* @param offerRequest Client offer request
|
||||
* @param errorMessage message to show to player when offer is invalid
|
||||
* @returns Is offer valid
|
||||
*/
|
||||
protected isValidPlayerOfferRequest(offerRequest: IAddOfferRequestData, errorMessage: string): boolean;
|
||||
/**
|
||||
* Get the handbook price in roubles for the items being listed
|
||||
* @param requirements
|
||||
* @returns Rouble price
|
||||
*/
|
||||
protected calculateRequirementsPriceInRub(requirements: Requirement[]): number;
|
||||
/**
|
||||
* Using item ids from flea offer request, find corrispnding items from player inventory and return as array
|
||||
* @param pmcData Player profile
|
||||
* @param itemIdsFromFleaOfferRequest Ids from request
|
||||
* @param errorMessage if item is not found, add error message to this parameter
|
||||
* @returns Array of items from player inventory
|
||||
*/
|
||||
protected getItemsToListOnFleaFromInventory(pmcData: IPmcData, itemIdsFromFleaOfferRequest: string[], errorMessage: string): Item[];
|
||||
createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer;
|
||||
getAllFleaPrices(): Record<string, number>;
|
||||
getStaticPrices(): Record<string, number>;
|
||||
|
@ -2,7 +2,7 @@ import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||
import { Health as PmcHealth, IBaseJsonSkills, IBaseSkill, IBotBase, Info, Skills as botSkills } from "../models/eft/common/tables/IBotBase";
|
||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase";
|
||||
import { Health, IBotType } from "../models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
@ -93,9 +93,10 @@ export declare class BotGenerator {
|
||||
/**
|
||||
* Randomise the progress value of passed in skills based on the min/max value
|
||||
* @param skills Skills to randomise
|
||||
* @param isCommonSkills Are the skills 'common' skills
|
||||
* @returns Skills with randomised progress values as an array
|
||||
*/
|
||||
protected getSkillsWithRandomisedProgressValue(skills: IBaseSkill[]): IBaseSkill[];
|
||||
protected getSkillsWithRandomisedProgressValue(skills: Record<string, IBaseSkill>, isCommonSkills: boolean): IBaseSkill[];
|
||||
/**
|
||||
* Generate a random Id for a bot and apply to bots _id and aid value
|
||||
* @param bot bot to update
|
||||
|
@ -9,6 +9,10 @@ import { ItemFilterService } from "../services/ItemFilterService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
type ItemLimit = {
|
||||
current: number;
|
||||
max: number;
|
||||
};
|
||||
export declare class LootGenerator {
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
@ -25,14 +29,11 @@ export declare class LootGenerator {
|
||||
*/
|
||||
createRandomLoot(options: LootRequest): LootItem[];
|
||||
/**
|
||||
* Construct item limit record to hold max and current item count
|
||||
* Construct item limit record to hold max and current item count for each item type
|
||||
* @param limits limits as defined in config
|
||||
* @returns record, key: item tplId, value: current/max item count allowed
|
||||
*/
|
||||
protected initItemLimitCounter(limits: Record<string, number>): Record<string, {
|
||||
current: number;
|
||||
max: number;
|
||||
}>;
|
||||
protected initItemLimitCounter(limits: Record<string, number>): Record<string, ItemLimit>;
|
||||
/**
|
||||
* Find a random item in items.json and add to result array
|
||||
* @param items items to choose from
|
||||
@ -65,3 +66,4 @@ export declare class LootGenerator {
|
||||
max: number;
|
||||
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
||||
}
|
||||
export {};
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
declare class LookupItem {
|
||||
byId: Record<number, string>;
|
||||
byParent: Record<string, string[]>;
|
||||
declare class LookupItem<T, I> {
|
||||
readonly byId: Map<string, T>;
|
||||
readonly byParent: Map<string, I[]>;
|
||||
constructor();
|
||||
}
|
||||
export declare class LookupCollection {
|
||||
items: LookupItem;
|
||||
categories: LookupItem;
|
||||
readonly items: LookupItem<number, string>;
|
||||
readonly categories: LookupItem<string, string>;
|
||||
constructor();
|
||||
}
|
||||
export declare class HandbookHelper {
|
||||
|
@ -6,6 +6,7 @@ import { IHideoutContinuousProductionStartRequestData } from "../models/eft/hide
|
||||
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
|
||||
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -36,7 +37,6 @@ export declare class HideoutHelper {
|
||||
static bitcoin: string;
|
||||
static expeditionaryFuelTank: string;
|
||||
static maxSkillPoint: number;
|
||||
private static generatorOffMultipler;
|
||||
protected hideoutConfig: IHideoutConfig;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
@ -131,9 +131,41 @@ export declare class HideoutHelper {
|
||||
* @returns Updated HideoutArea object
|
||||
*/
|
||||
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
||||
/**
|
||||
* Get the water filter drain rate based on hideout bonues player has
|
||||
* @param pmcData Player profile
|
||||
* @returns Drain rate
|
||||
*/
|
||||
protected getWaterFilterDrainRate(pmcData: IPmcData): number;
|
||||
/**
|
||||
* Get the production time in seconds for the desired production
|
||||
* @param prodId Id, e.g. Water collector id
|
||||
* @returns seconds to produce item
|
||||
*/
|
||||
protected getProductionTimeSeconds(prodId: string): number;
|
||||
/**
|
||||
* Create a upd object using passed in parameters
|
||||
* @param stackCount
|
||||
* @param resourceValue
|
||||
* @param resourceUnitsConsumed
|
||||
* @returns Upd
|
||||
*/
|
||||
protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd;
|
||||
protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): void;
|
||||
protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production;
|
||||
/**
|
||||
* Add bitcoin object to btc production products array and set progress time
|
||||
* @param btcProd Bitcoin production object
|
||||
* @param coinCraftTimeSeconds Time to craft a bitcoin
|
||||
*/
|
||||
protected addBtcToProduction(btcProd: Production, coinCraftTimeSeconds: number): void;
|
||||
/**
|
||||
* Get number of ticks that have passed since hideout areas were last processed, reduced when generator is off
|
||||
* @param pmcData Player profile
|
||||
* @param isGeneratorOn Is the generator on for the duration of elapsed time
|
||||
* @returns Amount of time elapsed in seconds
|
||||
*/
|
||||
protected getTimeElapsedSinceLastServerTick(pmcData: IPmcData, isGeneratorOn: boolean): number;
|
||||
/**
|
||||
* Get a count of how many BTC can be gathered by the profile
|
||||
* @param pmcData Profile to look up
|
||||
@ -180,6 +212,12 @@ export declare class HideoutHelper {
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
getBTC(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionId: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Create a single bitcoin request object
|
||||
* @param pmcData Player profile
|
||||
* @returns IAddItemRequestData
|
||||
*/
|
||||
protected createBitcoinRequest(pmcData: IPmcData): IAddItemRequestData;
|
||||
/**
|
||||
* Upgrade hideout wall from starting level to interactable level if enough time has passed
|
||||
* @param pmcProfile Profile to upgrade wall in
|
||||
|
@ -44,6 +44,12 @@ export declare class InRaidHelper {
|
||||
* @returns adjusted karma level after kills are taken into account
|
||||
*/
|
||||
calculateFenceStandingChangeFromKills(existingFenceStanding: number, victims: Victim[]): number;
|
||||
/**
|
||||
* Get the standing gain/loss for killing an npc
|
||||
* @param victim Who was killed by player
|
||||
* @returns a numerical standing gain or loss
|
||||
*/
|
||||
protected getStandingChangeForKill(victim: Victim): number;
|
||||
/**
|
||||
* Reset a profile to a baseline, used post-raid
|
||||
* Reset points earned during session property
|
||||
@ -79,7 +85,7 @@ export declare class InRaidHelper {
|
||||
* @param preRaidProfile profile to update
|
||||
* @param postRaidProfile profile to update inventory contents of
|
||||
* @param isPlayerScav Was this a p scav raid
|
||||
* @returns
|
||||
* @returns profile with FiR items properly tagged
|
||||
*/
|
||||
addSpawnedInSessionPropertyToItems(preRaidProfile: IPmcData, postRaidProfile: IPmcData, isPlayerScav: boolean): IPmcData;
|
||||
/**
|
||||
@ -107,6 +113,12 @@ export declare class InRaidHelper {
|
||||
* @param sessionID Session id
|
||||
*/
|
||||
deleteInventory(pmcData: IPmcData, sessionID: string): void;
|
||||
/**
|
||||
* Get an array of items from a profile that will be lost on death
|
||||
* @param pmcProfile Profile to get items from
|
||||
* @returns Array of items lost on death
|
||||
*/
|
||||
protected getInventoryItemsLostOnDeath(pmcProfile: IPmcData): Item[];
|
||||
/**
|
||||
* Get items in vest/pocket/backpack inventory containers (excluding children)
|
||||
* @param pmcData Player profile
|
||||
|
@ -84,8 +84,8 @@ export declare class InventoryHelper {
|
||||
*/
|
||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record<number, number>;
|
||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): Record<number, number>;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
||||
protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash;
|
||||
getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][];
|
||||
/**
|
||||
|
@ -120,7 +120,7 @@ declare class ItemHelper {
|
||||
*/
|
||||
protected getRepairableItemQualityValue(itemDetails: ITemplateItem, repairable: Repairable, item: Item): number;
|
||||
/**
|
||||
* Recursive function that looks at every item from parameter and gets their childrens Ids
|
||||
* Recursive function that looks at every item from parameter and gets their childrens Ids + includes parent item in results
|
||||
* @param items
|
||||
* @param itemID
|
||||
* @returns an array of strings
|
||||
|
@ -45,7 +45,16 @@ export declare class ProfileHelper {
|
||||
* @returns updated profile array
|
||||
*/
|
||||
protected postRaidXpWorkaroundFix(sessionId: string, output: IPmcData[], pmcProfile: IPmcData, scavProfile: IPmcData): IPmcData[];
|
||||
isNicknameTaken(info: IValidateNicknameRequestData, sessionID: string): boolean;
|
||||
/**
|
||||
* Check if a nickname is used by another profile loaded by the server
|
||||
* @param nicknameRequest
|
||||
* @param sessionID Session id
|
||||
* @returns True if already used
|
||||
*/
|
||||
isNicknameTaken(nicknameRequest: IValidateNicknameRequestData, sessionID: string): boolean;
|
||||
protected profileHasInfoProperty(profile: IAkiProfile): boolean;
|
||||
protected nicknameMatches(profileName: string, nicknameRequest: string): boolean;
|
||||
protected sessionIdMatchesProfileId(profileId: string, sessionId: string): boolean;
|
||||
/**
|
||||
* Add experience to a PMC inside the players profile
|
||||
* @param sessionID Session id
|
||||
|
@ -55,6 +55,13 @@ export declare class TraderHelper {
|
||||
* @param standingToAdd Standing value to add to trader
|
||||
*/
|
||||
addStandingToTrader(sessionId: string, traderId: string, standingToAdd: number): void;
|
||||
/**
|
||||
* Add standing to current standing and clamp value if it goes too low
|
||||
* @param currentStanding current trader standing
|
||||
* @param standingToAdd stansding to add to trader standing
|
||||
* @returns current standing + added standing (clamped if needed)
|
||||
*/
|
||||
protected addStandingValuesTogether(currentStanding: number, standingToAdd: number): number;
|
||||
/**
|
||||
* Calculate traders level based on exp amount and increments level if over threshold
|
||||
* @param traderID trader to process
|
||||
|
@ -18,6 +18,7 @@ export declare class BundleLoader {
|
||||
getBundles(local: boolean): BundleInfo[];
|
||||
getBundle(key: string, local: boolean): BundleInfo;
|
||||
addBundles(modpath: string): void;
|
||||
addBundle(key: string, b: BundleInfo): void;
|
||||
}
|
||||
export interface BundleManifest {
|
||||
manifest: Array<BundleManifestEntry>;
|
||||
|
@ -7,6 +7,10 @@ export interface ITemplateItem {
|
||||
_proto: string;
|
||||
}
|
||||
export interface Props {
|
||||
AllowSpawnOnLocations?: any[];
|
||||
ChangePriceCoef?: number;
|
||||
FixedPrice?: boolean;
|
||||
SendToClient?: boolean;
|
||||
Name?: string;
|
||||
ShortName?: string;
|
||||
Description?: string;
|
||||
@ -102,7 +106,7 @@ export interface Props {
|
||||
MaskSize?: number;
|
||||
NoiseIntensity?: number;
|
||||
NoiseScale?: number;
|
||||
Color?: Color;
|
||||
Color?: IColor;
|
||||
DiffuseIntensity?: number;
|
||||
HasHinge?: boolean;
|
||||
RampPalette?: string;
|
||||
@ -259,7 +263,7 @@ export interface Props {
|
||||
foodEffectType?: string;
|
||||
StimulatorBuffs?: string;
|
||||
effects_health?: IHealthEffect[] | Record<string, Record<string, number>>;
|
||||
effects_damage?: any;
|
||||
effects_damage?: Record<string, IEffectDamageProps>;
|
||||
MaximumNumberOfUsage?: number;
|
||||
knifeHitDelay?: number;
|
||||
knifeHitSlashRate?: number;
|
||||
@ -443,15 +447,15 @@ export interface EffectsHealthProps {
|
||||
value: number;
|
||||
}
|
||||
export interface EffectsDamage {
|
||||
Pain: EffectDamageProps;
|
||||
LightBleeding: EffectDamageProps;
|
||||
HeavyBleeding: EffectDamageProps;
|
||||
Contusion: EffectDamageProps;
|
||||
RadExposure: EffectDamageProps;
|
||||
Fracture: EffectDamageProps;
|
||||
DestroyedPart: EffectDamageProps;
|
||||
Pain: IEffectDamageProps;
|
||||
LightBleeding: IEffectDamageProps;
|
||||
HeavyBleeding: IEffectDamageProps;
|
||||
Contusion: IEffectDamageProps;
|
||||
RadExposure: IEffectDamageProps;
|
||||
Fracture: IEffectDamageProps;
|
||||
DestroyedPart: IEffectDamageProps;
|
||||
}
|
||||
export interface EffectDamageProps {
|
||||
export interface IEffectDamageProps {
|
||||
delay: number;
|
||||
duration: number;
|
||||
fadeOut: number;
|
||||
@ -459,7 +463,7 @@ export interface EffectDamageProps {
|
||||
healthPenaltyMin?: number;
|
||||
healthPenaltyMax?: number;
|
||||
}
|
||||
export interface Color {
|
||||
export interface IColor {
|
||||
r: number;
|
||||
g: number;
|
||||
b: number;
|
||||
|
@ -82,9 +82,9 @@ export interface ISuit {
|
||||
tid: string;
|
||||
suiteId: string;
|
||||
isActive: boolean;
|
||||
requirements: Requirements;
|
||||
requirements: ISuitRequirements;
|
||||
}
|
||||
export interface Requirements {
|
||||
export interface ISuitRequirements {
|
||||
loyaltyLevel: number;
|
||||
profileLevel: number;
|
||||
standing: number;
|
||||
|
@ -56,7 +56,7 @@ export declare enum BaseClasses {
|
||||
AMMO = "5485a8684bdc2da71d8b4567",
|
||||
AMMO_BOX = "543be5cb4bdc2deb348b4568",
|
||||
LOOT_CONTAINER = "566965d44bdc2d814c8b4571",
|
||||
MOD_CONTAINER = "5448bf274bdc2dfc2f8b456a",
|
||||
MOB_CONTAINER = "5448bf274bdc2dfc2f8b456a",
|
||||
SEARCHABLE_ITEM = "566168634bdc2d144c8b456c",
|
||||
STASH = "566abbb64bdc2d144c8b457d",
|
||||
SORTING_TABLE = "6050cac987d3f925bf016837",
|
||||
|
@ -5,4 +5,6 @@ export interface IHttpConfig extends IBaseConfig {
|
||||
ip: string;
|
||||
port: number;
|
||||
logRequests: boolean;
|
||||
/** e.g. "Aki_Data/Server/images/traders/579dc571d53a0658a154fbec.png": "Aki_Data/Server/images/traders/NewTraderImage.png" */
|
||||
serverImagePathOverride: Record<string, string>;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ export declare class BotGenerationCacheService {
|
||||
*/
|
||||
getBot(key: string): IBotBase;
|
||||
/**
|
||||
* Remove all cached bot profiles
|
||||
* Remove all cached bot profiles from memory
|
||||
*/
|
||||
clearStoredBots(): void;
|
||||
/**
|
||||
|
@ -19,7 +19,7 @@ export declare class BotLootCacheService {
|
||||
protected lootCache: Record<string, IBotLootCache>;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService);
|
||||
/**
|
||||
* Remove all cached bot loot data
|
||||
* Remove cached bot loot data
|
||||
*/
|
||||
clearCache(): void;
|
||||
/**
|
||||
|
@ -106,6 +106,7 @@ export declare class FenceService {
|
||||
protected getCountOfItemsToGenerate(existingItemCountToReplace: number): number;
|
||||
/**
|
||||
* Choose an item (not mod) at random and remove from assorts
|
||||
* @param assort Items to remove from
|
||||
*/
|
||||
protected removeRandomItemFromAssorts(assort: ITraderAssort): void;
|
||||
/**
|
||||
|
@ -50,6 +50,7 @@ export declare class InsuranceService {
|
||||
* @param mapId Id of the map player died/exited that caused the insurance to be issued on
|
||||
*/
|
||||
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
|
||||
protected removeLocationProperty(sessionId: string, traderId: string): void;
|
||||
/**
|
||||
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure
|
||||
* @param pmcData Player profile
|
||||
@ -66,6 +67,12 @@ export declare class InsuranceService {
|
||||
* @param playerDied did the player die in raid
|
||||
*/
|
||||
storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void;
|
||||
/**
|
||||
* Create a hash table for an array of items, keyed by items _id
|
||||
* @param items Items to hash
|
||||
* @returns Hashtable
|
||||
*/
|
||||
protected createItemHashTable(items: Item[]): Record<string, Item>;
|
||||
/**
|
||||
* Store insured items on pmc death inside insurance array in player profile
|
||||
* @param pmcData Player profile
|
||||
|
@ -1,16 +1,18 @@
|
||||
import { I18n } from "i18n";
|
||||
import { ILocaleConfig } from "../models/spt/config/ILocaleConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocaleService } from "./LocaleService";
|
||||
/**
|
||||
* Handles translating server text into different langauges
|
||||
*/
|
||||
export declare class LocalisationService {
|
||||
protected logger: ILogger;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected localeService: LocaleService;
|
||||
protected localeConfig: ILocaleConfig;
|
||||
protected i18n: I18n;
|
||||
constructor(logger: ILogger, localeService: LocaleService);
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, localeService: LocaleService);
|
||||
/**
|
||||
* Get a localised value using the passed in key
|
||||
* @param key Key to loop up locale for
|
||||
|
@ -57,6 +57,13 @@ export declare class PaymentService {
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Get all money stacks in inventory and prioritse items in stash
|
||||
* @param pmcData
|
||||
* @param currencyTpl
|
||||
* @returns Sorting money items
|
||||
*/
|
||||
protected getSortedMoneyItemsInInventory(pmcData: IPmcData, currencyTpl: string): Item[];
|
||||
/**
|
||||
* Prioritise player stash first over player inventory
|
||||
* Post-raid healing would often take money out of the players pockets/secure container
|
||||
|
@ -22,9 +22,9 @@ export declare class RagfairCategoriesService {
|
||||
protected processOffersIntoCategories(offers: IRagfairOffer[]): Record<string, number>;
|
||||
/**
|
||||
* Increment or decrement a category array
|
||||
* @param offer offer to process
|
||||
* @param categories categories to update
|
||||
* @param increment should item be incremented or decremented
|
||||
* @param offer Offer to process
|
||||
* @param categories Categories to update
|
||||
* @param increment (Optional) Should item be incremented or decremented
|
||||
*/
|
||||
protected addOrIncrementCategory(offer: IRagfairOffer, categories: Record<string, number>, increment?: boolean): void;
|
||||
/**
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ImageRouter } from "../routers/ImageRouter";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { EncodingUtil } from "./EncodingUtil";
|
||||
@ -18,10 +20,12 @@ export declare class DatabaseImporter implements OnLoad {
|
||||
protected encodingUtil: EncodingUtil;
|
||||
protected hashUtil: HashUtil;
|
||||
protected importerUtil: ImporterUtil;
|
||||
protected configServer: ConfigServer;
|
||||
private hashedFile;
|
||||
private valid;
|
||||
private filepath;
|
||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil);
|
||||
protected httpConfig: IHttpConfig;
|
||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer);
|
||||
onLoad(): Promise<void>;
|
||||
/**
|
||||
* Read all json files in database folder and map into a json object
|
||||
@ -31,5 +35,15 @@ export declare class DatabaseImporter implements OnLoad {
|
||||
private onReadValidate;
|
||||
getRoute(): string;
|
||||
private validateFile;
|
||||
loadImages(filepath: string): void;
|
||||
/**
|
||||
* Find and map files with image router inside a designated path
|
||||
* @param filepath Path to find files in
|
||||
*/
|
||||
loadImages(filepath: string, routes: string[]): void;
|
||||
/**
|
||||
* Check for a path override in the http json config file
|
||||
* @param imagePath Key
|
||||
* @returns override for key
|
||||
*/
|
||||
protected getImagePathOverride(imagePath: string): string;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { ISuit } from "../models/eft/common/tables/ITrader";
|
||||
import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
||||
import { ClothingItem, IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
||||
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -18,7 +18,32 @@ export declare class CustomizationController {
|
||||
protected profileHelper: ProfileHelper;
|
||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
||||
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
||||
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
|
||||
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
|
||||
/**
|
||||
* Has an outfit been purchased by a player
|
||||
* @param suitId clothing id
|
||||
* @param sessionID Session id
|
||||
* @returns true/false
|
||||
*/
|
||||
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
|
||||
/**
|
||||
* Update output object and player profile with purchase details
|
||||
* @param sessionId Session id
|
||||
* @param pmcData Player profile
|
||||
* @param clothingItems Clothing purchased
|
||||
* @param output Client response
|
||||
*/
|
||||
protected payForClothingItems(sessionId: string, pmcData: IPmcData, clothingItems: ClothingItem[], output: IItemEventRouterResponse): void;
|
||||
/**
|
||||
* Update output object and player profile with purchase details for single piece of clothing
|
||||
* @param sessionId Session id
|
||||
* @param pmcData Player profile
|
||||
* @param clothingItem Clothing item purchased
|
||||
* @param output Client response
|
||||
* @returns
|
||||
*/
|
||||
protected payForClothingItem(sessionId: string, pmcData: IPmcData, clothingItem: ClothingItem, output: IItemEventRouterResponse): void;
|
||||
protected getAllTraderSuits(sessionID: string): ISuit[];
|
||||
}
|
||||
|
@ -73,8 +73,20 @@ export declare class DialogueController {
|
||||
*/
|
||||
protected getMessagesWithAttachments(messages: Message[]): Message[];
|
||||
/**
|
||||
* Delete expired items. triggers when updating traders.
|
||||
* @param sessionID Session id
|
||||
* Delete expired items from all messages in player profile. triggers when updating traders.
|
||||
* @param sessionId Session id
|
||||
*/
|
||||
protected removeExpiredItems(sessionID: string): void;
|
||||
protected removeExpiredItemsFromMessages(sessionId: string): void;
|
||||
/**
|
||||
* Removes expired items from a message in player profile
|
||||
* @param sessionId Session id
|
||||
* @param dialogueId Dialog id
|
||||
*/
|
||||
protected removeExpiredItemsFromMessage(sessionId: string, dialogueId: string): void;
|
||||
/**
|
||||
* Has a dialog message expired
|
||||
* @param message Message to check expiry of
|
||||
* @returns true or false
|
||||
*/
|
||||
protected messageHasExpired(message: Message): boolean;
|
||||
}
|
||||
|
@ -137,9 +137,9 @@ export declare class HideoutController {
|
||||
* Add generated scav case rewards to player profile
|
||||
* @param pmcData player profile to add rewards to
|
||||
* @param rewards reward items to add to profile
|
||||
* @param recipieId recipie id to save into Production dict
|
||||
* @param recipeId recipe id to save into Production dict
|
||||
*/
|
||||
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[], recipieId: string): void;
|
||||
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[], recipeId: string): void;
|
||||
/**
|
||||
* Start production of continuously created item
|
||||
* @param pmcData Player profile
|
||||
@ -157,15 +157,15 @@ export declare class HideoutController {
|
||||
*/
|
||||
takeProduction(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Take recipie-type production out of hideout area and place into player inventory
|
||||
* Take recipe-type production out of hideout area and place into player inventory
|
||||
* @param sessionID Session id
|
||||
* @param recipe Completed recipie of item
|
||||
* @param recipe Completed recipe of item
|
||||
* @param pmcData Player profile
|
||||
* @param request Remove production from area request
|
||||
* @param output Output object to update
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
protected handleRecipe(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles giving rewards stored in player profile to player after clicking 'get rewards'
|
||||
* @param sessionID Session id
|
||||
|
@ -53,5 +53,25 @@ export declare class MatchController {
|
||||
* @returns bot difficulty
|
||||
*/
|
||||
protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string;
|
||||
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
|
||||
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void;
|
||||
/**
|
||||
* Is extract by car
|
||||
* @param extractName name of extract
|
||||
* @returns true if car extract
|
||||
*/
|
||||
protected extractWasViaCar(extractName: string): boolean;
|
||||
/**
|
||||
* Handle when a player extracts using a car - Add rep to fence
|
||||
* @param extractName name of the extract used
|
||||
* @param pmcData Player profile
|
||||
* @param sessionId Session id
|
||||
*/
|
||||
protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void;
|
||||
/**
|
||||
* Update players fence trader standing value in profile
|
||||
* @param pmcData Player profile
|
||||
* @param fenceId Id of fence trader
|
||||
* @param extractName Name of extract used
|
||||
*/
|
||||
protected updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void;
|
||||
}
|
||||
|
@ -117,7 +117,35 @@ export declare class RagfairController {
|
||||
* @returns min/avg/max values for an item based on flea offers available
|
||||
*/
|
||||
getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult;
|
||||
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* List item(s) on flea for sale
|
||||
* @param pmcData Player profile
|
||||
* @param offerRequest Flea list creatio offer
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
addPlayerOffer(pmcData: IPmcData, offerRequest: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Is the item to be listed on the flea valid
|
||||
* @param offerRequest Client offer request
|
||||
* @param errorMessage message to show to player when offer is invalid
|
||||
* @returns Is offer valid
|
||||
*/
|
||||
protected isValidPlayerOfferRequest(offerRequest: IAddOfferRequestData, errorMessage: string): boolean;
|
||||
/**
|
||||
* Get the handbook price in roubles for the items being listed
|
||||
* @param requirements
|
||||
* @returns Rouble price
|
||||
*/
|
||||
protected calculateRequirementsPriceInRub(requirements: Requirement[]): number;
|
||||
/**
|
||||
* Using item ids from flea offer request, find corrispnding items from player inventory and return as array
|
||||
* @param pmcData Player profile
|
||||
* @param itemIdsFromFleaOfferRequest Ids from request
|
||||
* @param errorMessage if item is not found, add error message to this parameter
|
||||
* @returns Array of items from player inventory
|
||||
*/
|
||||
protected getItemsToListOnFleaFromInventory(pmcData: IPmcData, itemIdsFromFleaOfferRequest: string[], errorMessage: string): Item[];
|
||||
createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer;
|
||||
getAllFleaPrices(): Record<string, number>;
|
||||
getStaticPrices(): Record<string, number>;
|
||||
|
@ -2,7 +2,7 @@ import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||
import { Health as PmcHealth, IBaseJsonSkills, IBaseSkill, IBotBase, Info, Skills as botSkills } from "../models/eft/common/tables/IBotBase";
|
||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase";
|
||||
import { Health, IBotType } from "../models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
@ -93,9 +93,10 @@ export declare class BotGenerator {
|
||||
/**
|
||||
* Randomise the progress value of passed in skills based on the min/max value
|
||||
* @param skills Skills to randomise
|
||||
* @param isCommonSkills Are the skills 'common' skills
|
||||
* @returns Skills with randomised progress values as an array
|
||||
*/
|
||||
protected getSkillsWithRandomisedProgressValue(skills: IBaseSkill[]): IBaseSkill[];
|
||||
protected getSkillsWithRandomisedProgressValue(skills: Record<string, IBaseSkill>, isCommonSkills: boolean): IBaseSkill[];
|
||||
/**
|
||||
* Generate a random Id for a bot and apply to bots _id and aid value
|
||||
* @param bot bot to update
|
||||
|
@ -9,6 +9,10 @@ import { ItemFilterService } from "../services/ItemFilterService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
type ItemLimit = {
|
||||
current: number;
|
||||
max: number;
|
||||
};
|
||||
export declare class LootGenerator {
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
@ -25,14 +29,11 @@ export declare class LootGenerator {
|
||||
*/
|
||||
createRandomLoot(options: LootRequest): LootItem[];
|
||||
/**
|
||||
* Construct item limit record to hold max and current item count
|
||||
* Construct item limit record to hold max and current item count for each item type
|
||||
* @param limits limits as defined in config
|
||||
* @returns record, key: item tplId, value: current/max item count allowed
|
||||
*/
|
||||
protected initItemLimitCounter(limits: Record<string, number>): Record<string, {
|
||||
current: number;
|
||||
max: number;
|
||||
}>;
|
||||
protected initItemLimitCounter(limits: Record<string, number>): Record<string, ItemLimit>;
|
||||
/**
|
||||
* Find a random item in items.json and add to result array
|
||||
* @param items items to choose from
|
||||
@ -65,3 +66,4 @@ export declare class LootGenerator {
|
||||
max: number;
|
||||
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
||||
}
|
||||
export {};
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
declare class LookupItem {
|
||||
byId: Record<number, string>;
|
||||
byParent: Record<string, string[]>;
|
||||
declare class LookupItem<T, I> {
|
||||
readonly byId: Map<string, T>;
|
||||
readonly byParent: Map<string, I[]>;
|
||||
constructor();
|
||||
}
|
||||
export declare class LookupCollection {
|
||||
items: LookupItem;
|
||||
categories: LookupItem;
|
||||
readonly items: LookupItem<number, string>;
|
||||
readonly categories: LookupItem<string, string>;
|
||||
constructor();
|
||||
}
|
||||
export declare class HandbookHelper {
|
||||
|
@ -6,6 +6,7 @@ import { IHideoutContinuousProductionStartRequestData } from "../models/eft/hide
|
||||
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
|
||||
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -36,7 +37,6 @@ export declare class HideoutHelper {
|
||||
static bitcoin: string;
|
||||
static expeditionaryFuelTank: string;
|
||||
static maxSkillPoint: number;
|
||||
private static generatorOffMultipler;
|
||||
protected hideoutConfig: IHideoutConfig;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
@ -131,9 +131,41 @@ export declare class HideoutHelper {
|
||||
* @returns Updated HideoutArea object
|
||||
*/
|
||||
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
||||
/**
|
||||
* Get the water filter drain rate based on hideout bonues player has
|
||||
* @param pmcData Player profile
|
||||
* @returns Drain rate
|
||||
*/
|
||||
protected getWaterFilterDrainRate(pmcData: IPmcData): number;
|
||||
/**
|
||||
* Get the production time in seconds for the desired production
|
||||
* @param prodId Id, e.g. Water collector id
|
||||
* @returns seconds to produce item
|
||||
*/
|
||||
protected getProductionTimeSeconds(prodId: string): number;
|
||||
/**
|
||||
* Create a upd object using passed in parameters
|
||||
* @param stackCount
|
||||
* @param resourceValue
|
||||
* @param resourceUnitsConsumed
|
||||
* @returns Upd
|
||||
*/
|
||||
protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd;
|
||||
protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): void;
|
||||
protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production;
|
||||
/**
|
||||
* Add bitcoin object to btc production products array and set progress time
|
||||
* @param btcProd Bitcoin production object
|
||||
* @param coinCraftTimeSeconds Time to craft a bitcoin
|
||||
*/
|
||||
protected addBtcToProduction(btcProd: Production, coinCraftTimeSeconds: number): void;
|
||||
/**
|
||||
* Get number of ticks that have passed since hideout areas were last processed, reduced when generator is off
|
||||
* @param pmcData Player profile
|
||||
* @param isGeneratorOn Is the generator on for the duration of elapsed time
|
||||
* @returns Amount of time elapsed in seconds
|
||||
*/
|
||||
protected getTimeElapsedSinceLastServerTick(pmcData: IPmcData, isGeneratorOn: boolean): number;
|
||||
/**
|
||||
* Get a count of how many BTC can be gathered by the profile
|
||||
* @param pmcData Profile to look up
|
||||
@ -180,6 +212,12 @@ export declare class HideoutHelper {
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
getBTC(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionId: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Create a single bitcoin request object
|
||||
* @param pmcData Player profile
|
||||
* @returns IAddItemRequestData
|
||||
*/
|
||||
protected createBitcoinRequest(pmcData: IPmcData): IAddItemRequestData;
|
||||
/**
|
||||
* Upgrade hideout wall from starting level to interactable level if enough time has passed
|
||||
* @param pmcProfile Profile to upgrade wall in
|
||||
|
@ -44,6 +44,12 @@ export declare class InRaidHelper {
|
||||
* @returns adjusted karma level after kills are taken into account
|
||||
*/
|
||||
calculateFenceStandingChangeFromKills(existingFenceStanding: number, victims: Victim[]): number;
|
||||
/**
|
||||
* Get the standing gain/loss for killing an npc
|
||||
* @param victim Who was killed by player
|
||||
* @returns a numerical standing gain or loss
|
||||
*/
|
||||
protected getStandingChangeForKill(victim: Victim): number;
|
||||
/**
|
||||
* Reset a profile to a baseline, used post-raid
|
||||
* Reset points earned during session property
|
||||
@ -79,7 +85,7 @@ export declare class InRaidHelper {
|
||||
* @param preRaidProfile profile to update
|
||||
* @param postRaidProfile profile to update inventory contents of
|
||||
* @param isPlayerScav Was this a p scav raid
|
||||
* @returns
|
||||
* @returns profile with FiR items properly tagged
|
||||
*/
|
||||
addSpawnedInSessionPropertyToItems(preRaidProfile: IPmcData, postRaidProfile: IPmcData, isPlayerScav: boolean): IPmcData;
|
||||
/**
|
||||
@ -107,6 +113,12 @@ export declare class InRaidHelper {
|
||||
* @param sessionID Session id
|
||||
*/
|
||||
deleteInventory(pmcData: IPmcData, sessionID: string): void;
|
||||
/**
|
||||
* Get an array of items from a profile that will be lost on death
|
||||
* @param pmcProfile Profile to get items from
|
||||
* @returns Array of items lost on death
|
||||
*/
|
||||
protected getInventoryItemsLostOnDeath(pmcProfile: IPmcData): Item[];
|
||||
/**
|
||||
* Get items in vest/pocket/backpack inventory containers (excluding children)
|
||||
* @param pmcData Player profile
|
||||
|
@ -84,8 +84,8 @@ export declare class InventoryHelper {
|
||||
*/
|
||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record<number, number>;
|
||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): Record<number, number>;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
||||
protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash;
|
||||
getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][];
|
||||
/**
|
||||
|
@ -120,7 +120,7 @@ declare class ItemHelper {
|
||||
*/
|
||||
protected getRepairableItemQualityValue(itemDetails: ITemplateItem, repairable: Repairable, item: Item): number;
|
||||
/**
|
||||
* Recursive function that looks at every item from parameter and gets their childrens Ids
|
||||
* Recursive function that looks at every item from parameter and gets their childrens Ids + includes parent item in results
|
||||
* @param items
|
||||
* @param itemID
|
||||
* @returns an array of strings
|
||||
|
@ -45,7 +45,16 @@ export declare class ProfileHelper {
|
||||
* @returns updated profile array
|
||||
*/
|
||||
protected postRaidXpWorkaroundFix(sessionId: string, output: IPmcData[], pmcProfile: IPmcData, scavProfile: IPmcData): IPmcData[];
|
||||
isNicknameTaken(info: IValidateNicknameRequestData, sessionID: string): boolean;
|
||||
/**
|
||||
* Check if a nickname is used by another profile loaded by the server
|
||||
* @param nicknameRequest
|
||||
* @param sessionID Session id
|
||||
* @returns True if already used
|
||||
*/
|
||||
isNicknameTaken(nicknameRequest: IValidateNicknameRequestData, sessionID: string): boolean;
|
||||
protected profileHasInfoProperty(profile: IAkiProfile): boolean;
|
||||
protected nicknameMatches(profileName: string, nicknameRequest: string): boolean;
|
||||
protected sessionIdMatchesProfileId(profileId: string, sessionId: string): boolean;
|
||||
/**
|
||||
* Add experience to a PMC inside the players profile
|
||||
* @param sessionID Session id
|
||||
|
@ -55,6 +55,13 @@ export declare class TraderHelper {
|
||||
* @param standingToAdd Standing value to add to trader
|
||||
*/
|
||||
addStandingToTrader(sessionId: string, traderId: string, standingToAdd: number): void;
|
||||
/**
|
||||
* Add standing to current standing and clamp value if it goes too low
|
||||
* @param currentStanding current trader standing
|
||||
* @param standingToAdd stansding to add to trader standing
|
||||
* @returns current standing + added standing (clamped if needed)
|
||||
*/
|
||||
protected addStandingValuesTogether(currentStanding: number, standingToAdd: number): number;
|
||||
/**
|
||||
* Calculate traders level based on exp amount and increments level if over threshold
|
||||
* @param traderID trader to process
|
||||
|
@ -18,6 +18,7 @@ export declare class BundleLoader {
|
||||
getBundles(local: boolean): BundleInfo[];
|
||||
getBundle(key: string, local: boolean): BundleInfo;
|
||||
addBundles(modpath: string): void;
|
||||
addBundle(key: string, b: BundleInfo): void;
|
||||
}
|
||||
export interface BundleManifest {
|
||||
manifest: Array<BundleManifestEntry>;
|
||||
|
@ -7,6 +7,10 @@ export interface ITemplateItem {
|
||||
_proto: string;
|
||||
}
|
||||
export interface Props {
|
||||
AllowSpawnOnLocations?: any[];
|
||||
ChangePriceCoef?: number;
|
||||
FixedPrice?: boolean;
|
||||
SendToClient?: boolean;
|
||||
Name?: string;
|
||||
ShortName?: string;
|
||||
Description?: string;
|
||||
@ -102,7 +106,7 @@ export interface Props {
|
||||
MaskSize?: number;
|
||||
NoiseIntensity?: number;
|
||||
NoiseScale?: number;
|
||||
Color?: Color;
|
||||
Color?: IColor;
|
||||
DiffuseIntensity?: number;
|
||||
HasHinge?: boolean;
|
||||
RampPalette?: string;
|
||||
@ -259,7 +263,7 @@ export interface Props {
|
||||
foodEffectType?: string;
|
||||
StimulatorBuffs?: string;
|
||||
effects_health?: IHealthEffect[] | Record<string, Record<string, number>>;
|
||||
effects_damage?: any;
|
||||
effects_damage?: Record<string, IEffectDamageProps>;
|
||||
MaximumNumberOfUsage?: number;
|
||||
knifeHitDelay?: number;
|
||||
knifeHitSlashRate?: number;
|
||||
@ -443,15 +447,15 @@ export interface EffectsHealthProps {
|
||||
value: number;
|
||||
}
|
||||
export interface EffectsDamage {
|
||||
Pain: EffectDamageProps;
|
||||
LightBleeding: EffectDamageProps;
|
||||
HeavyBleeding: EffectDamageProps;
|
||||
Contusion: EffectDamageProps;
|
||||
RadExposure: EffectDamageProps;
|
||||
Fracture: EffectDamageProps;
|
||||
DestroyedPart: EffectDamageProps;
|
||||
Pain: IEffectDamageProps;
|
||||
LightBleeding: IEffectDamageProps;
|
||||
HeavyBleeding: IEffectDamageProps;
|
||||
Contusion: IEffectDamageProps;
|
||||
RadExposure: IEffectDamageProps;
|
||||
Fracture: IEffectDamageProps;
|
||||
DestroyedPart: IEffectDamageProps;
|
||||
}
|
||||
export interface EffectDamageProps {
|
||||
export interface IEffectDamageProps {
|
||||
delay: number;
|
||||
duration: number;
|
||||
fadeOut: number;
|
||||
@ -459,7 +463,7 @@ export interface EffectDamageProps {
|
||||
healthPenaltyMin?: number;
|
||||
healthPenaltyMax?: number;
|
||||
}
|
||||
export interface Color {
|
||||
export interface IColor {
|
||||
r: number;
|
||||
g: number;
|
||||
b: number;
|
||||
|
@ -82,9 +82,9 @@ export interface ISuit {
|
||||
tid: string;
|
||||
suiteId: string;
|
||||
isActive: boolean;
|
||||
requirements: Requirements;
|
||||
requirements: ISuitRequirements;
|
||||
}
|
||||
export interface Requirements {
|
||||
export interface ISuitRequirements {
|
||||
loyaltyLevel: number;
|
||||
profileLevel: number;
|
||||
standing: number;
|
||||
|
@ -56,7 +56,7 @@ export declare enum BaseClasses {
|
||||
AMMO = "5485a8684bdc2da71d8b4567",
|
||||
AMMO_BOX = "543be5cb4bdc2deb348b4568",
|
||||
LOOT_CONTAINER = "566965d44bdc2d814c8b4571",
|
||||
MOD_CONTAINER = "5448bf274bdc2dfc2f8b456a",
|
||||
MOB_CONTAINER = "5448bf274bdc2dfc2f8b456a",
|
||||
SEARCHABLE_ITEM = "566168634bdc2d144c8b456c",
|
||||
STASH = "566abbb64bdc2d144c8b457d",
|
||||
SORTING_TABLE = "6050cac987d3f925bf016837",
|
||||
|
@ -5,4 +5,6 @@ export interface IHttpConfig extends IBaseConfig {
|
||||
ip: string;
|
||||
port: number;
|
||||
logRequests: boolean;
|
||||
/** e.g. "Aki_Data/Server/images/traders/579dc571d53a0658a154fbec.png": "Aki_Data/Server/images/traders/NewTraderImage.png" */
|
||||
serverImagePathOverride: Record<string, string>;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ export declare class BotGenerationCacheService {
|
||||
*/
|
||||
getBot(key: string): IBotBase;
|
||||
/**
|
||||
* Remove all cached bot profiles
|
||||
* Remove all cached bot profiles from memory
|
||||
*/
|
||||
clearStoredBots(): void;
|
||||
/**
|
||||
|
@ -19,7 +19,7 @@ export declare class BotLootCacheService {
|
||||
protected lootCache: Record<string, IBotLootCache>;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService);
|
||||
/**
|
||||
* Remove all cached bot loot data
|
||||
* Remove cached bot loot data
|
||||
*/
|
||||
clearCache(): void;
|
||||
/**
|
||||
|
@ -106,6 +106,7 @@ export declare class FenceService {
|
||||
protected getCountOfItemsToGenerate(existingItemCountToReplace: number): number;
|
||||
/**
|
||||
* Choose an item (not mod) at random and remove from assorts
|
||||
* @param assort Items to remove from
|
||||
*/
|
||||
protected removeRandomItemFromAssorts(assort: ITraderAssort): void;
|
||||
/**
|
||||
|
@ -50,6 +50,7 @@ export declare class InsuranceService {
|
||||
* @param mapId Id of the map player died/exited that caused the insurance to be issued on
|
||||
*/
|
||||
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
|
||||
protected removeLocationProperty(sessionId: string, traderId: string): void;
|
||||
/**
|
||||
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure
|
||||
* @param pmcData Player profile
|
||||
@ -66,6 +67,12 @@ export declare class InsuranceService {
|
||||
* @param playerDied did the player die in raid
|
||||
*/
|
||||
storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void;
|
||||
/**
|
||||
* Create a hash table for an array of items, keyed by items _id
|
||||
* @param items Items to hash
|
||||
* @returns Hashtable
|
||||
*/
|
||||
protected createItemHashTable(items: Item[]): Record<string, Item>;
|
||||
/**
|
||||
* Store insured items on pmc death inside insurance array in player profile
|
||||
* @param pmcData Player profile
|
||||
|
@ -1,16 +1,18 @@
|
||||
import { I18n } from "i18n";
|
||||
import { ILocaleConfig } from "../models/spt/config/ILocaleConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocaleService } from "./LocaleService";
|
||||
/**
|
||||
* Handles translating server text into different langauges
|
||||
*/
|
||||
export declare class LocalisationService {
|
||||
protected logger: ILogger;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected localeService: LocaleService;
|
||||
protected localeConfig: ILocaleConfig;
|
||||
protected i18n: I18n;
|
||||
constructor(logger: ILogger, localeService: LocaleService);
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, localeService: LocaleService);
|
||||
/**
|
||||
* Get a localised value using the passed in key
|
||||
* @param key Key to loop up locale for
|
||||
|
@ -57,6 +57,13 @@ export declare class PaymentService {
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Get all money stacks in inventory and prioritse items in stash
|
||||
* @param pmcData
|
||||
* @param currencyTpl
|
||||
* @returns Sorting money items
|
||||
*/
|
||||
protected getSortedMoneyItemsInInventory(pmcData: IPmcData, currencyTpl: string): Item[];
|
||||
/**
|
||||
* Prioritise player stash first over player inventory
|
||||
* Post-raid healing would often take money out of the players pockets/secure container
|
||||
|
@ -22,9 +22,9 @@ export declare class RagfairCategoriesService {
|
||||
protected processOffersIntoCategories(offers: IRagfairOffer[]): Record<string, number>;
|
||||
/**
|
||||
* Increment or decrement a category array
|
||||
* @param offer offer to process
|
||||
* @param categories categories to update
|
||||
* @param increment should item be incremented or decremented
|
||||
* @param offer Offer to process
|
||||
* @param categories Categories to update
|
||||
* @param increment (Optional) Should item be incremented or decremented
|
||||
*/
|
||||
protected addOrIncrementCategory(offer: IRagfairOffer, categories: Record<string, number>, increment?: boolean): void;
|
||||
/**
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ImageRouter } from "../routers/ImageRouter";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { EncodingUtil } from "./EncodingUtil";
|
||||
@ -18,10 +20,12 @@ export declare class DatabaseImporter implements OnLoad {
|
||||
protected encodingUtil: EncodingUtil;
|
||||
protected hashUtil: HashUtil;
|
||||
protected importerUtil: ImporterUtil;
|
||||
protected configServer: ConfigServer;
|
||||
private hashedFile;
|
||||
private valid;
|
||||
private filepath;
|
||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil);
|
||||
protected httpConfig: IHttpConfig;
|
||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer);
|
||||
onLoad(): Promise<void>;
|
||||
/**
|
||||
* Read all json files in database folder and map into a json object
|
||||
@ -31,5 +35,15 @@ export declare class DatabaseImporter implements OnLoad {
|
||||
private onReadValidate;
|
||||
getRoute(): string;
|
||||
private validateFile;
|
||||
loadImages(filepath: string): void;
|
||||
/**
|
||||
* Find and map files with image router inside a designated path
|
||||
* @param filepath Path to find files in
|
||||
*/
|
||||
loadImages(filepath: string, routes: string[]): void;
|
||||
/**
|
||||
* Check for a path override in the http json config file
|
||||
* @param imagePath Key
|
||||
* @returns override for key
|
||||
*/
|
||||
protected getImagePathOverride(imagePath: string): string;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { ISuit } from "../models/eft/common/tables/ITrader";
|
||||
import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
||||
import { ClothingItem, IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
||||
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -18,7 +18,32 @@ export declare class CustomizationController {
|
||||
protected profileHelper: ProfileHelper;
|
||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
||||
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
||||
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
|
||||
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
|
||||
/**
|
||||
* Has an outfit been purchased by a player
|
||||
* @param suitId clothing id
|
||||
* @param sessionID Session id
|
||||
* @returns true/false
|
||||
*/
|
||||
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
|
||||
/**
|
||||
* Update output object and player profile with purchase details
|
||||
* @param sessionId Session id
|
||||
* @param pmcData Player profile
|
||||
* @param clothingItems Clothing purchased
|
||||
* @param output Client response
|
||||
*/
|
||||
protected payForClothingItems(sessionId: string, pmcData: IPmcData, clothingItems: ClothingItem[], output: IItemEventRouterResponse): void;
|
||||
/**
|
||||
* Update output object and player profile with purchase details for single piece of clothing
|
||||
* @param sessionId Session id
|
||||
* @param pmcData Player profile
|
||||
* @param clothingItem Clothing item purchased
|
||||
* @param output Client response
|
||||
* @returns
|
||||
*/
|
||||
protected payForClothingItem(sessionId: string, pmcData: IPmcData, clothingItem: ClothingItem, output: IItemEventRouterResponse): void;
|
||||
protected getAllTraderSuits(sessionID: string): ISuit[];
|
||||
}
|
||||
|
@ -73,8 +73,20 @@ export declare class DialogueController {
|
||||
*/
|
||||
protected getMessagesWithAttachments(messages: Message[]): Message[];
|
||||
/**
|
||||
* Delete expired items. triggers when updating traders.
|
||||
* @param sessionID Session id
|
||||
* Delete expired items from all messages in player profile. triggers when updating traders.
|
||||
* @param sessionId Session id
|
||||
*/
|
||||
protected removeExpiredItems(sessionID: string): void;
|
||||
protected removeExpiredItemsFromMessages(sessionId: string): void;
|
||||
/**
|
||||
* Removes expired items from a message in player profile
|
||||
* @param sessionId Session id
|
||||
* @param dialogueId Dialog id
|
||||
*/
|
||||
protected removeExpiredItemsFromMessage(sessionId: string, dialogueId: string): void;
|
||||
/**
|
||||
* Has a dialog message expired
|
||||
* @param message Message to check expiry of
|
||||
* @returns true or false
|
||||
*/
|
||||
protected messageHasExpired(message: Message): boolean;
|
||||
}
|
||||
|
@ -137,9 +137,9 @@ export declare class HideoutController {
|
||||
* Add generated scav case rewards to player profile
|
||||
* @param pmcData player profile to add rewards to
|
||||
* @param rewards reward items to add to profile
|
||||
* @param recipieId recipie id to save into Production dict
|
||||
* @param recipeId recipe id to save into Production dict
|
||||
*/
|
||||
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[], recipieId: string): void;
|
||||
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[], recipeId: string): void;
|
||||
/**
|
||||
* Start production of continuously created item
|
||||
* @param pmcData Player profile
|
||||
@ -157,15 +157,15 @@ export declare class HideoutController {
|
||||
*/
|
||||
takeProduction(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Take recipie-type production out of hideout area and place into player inventory
|
||||
* Take recipe-type production out of hideout area and place into player inventory
|
||||
* @param sessionID Session id
|
||||
* @param recipe Completed recipie of item
|
||||
* @param recipe Completed recipe of item
|
||||
* @param pmcData Player profile
|
||||
* @param request Remove production from area request
|
||||
* @param output Output object to update
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
protected handleRecipe(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles giving rewards stored in player profile to player after clicking 'get rewards'
|
||||
* @param sessionID Session id
|
||||
|
@ -53,5 +53,25 @@ export declare class MatchController {
|
||||
* @returns bot difficulty
|
||||
*/
|
||||
protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string;
|
||||
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
|
||||
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void;
|
||||
/**
|
||||
* Is extract by car
|
||||
* @param extractName name of extract
|
||||
* @returns true if car extract
|
||||
*/
|
||||
protected extractWasViaCar(extractName: string): boolean;
|
||||
/**
|
||||
* Handle when a player extracts using a car - Add rep to fence
|
||||
* @param extractName name of the extract used
|
||||
* @param pmcData Player profile
|
||||
* @param sessionId Session id
|
||||
*/
|
||||
protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void;
|
||||
/**
|
||||
* Update players fence trader standing value in profile
|
||||
* @param pmcData Player profile
|
||||
* @param fenceId Id of fence trader
|
||||
* @param extractName Name of extract used
|
||||
*/
|
||||
protected updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void;
|
||||
}
|
||||
|
@ -117,7 +117,35 @@ export declare class RagfairController {
|
||||
* @returns min/avg/max values for an item based on flea offers available
|
||||
*/
|
||||
getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult;
|
||||
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* List item(s) on flea for sale
|
||||
* @param pmcData Player profile
|
||||
* @param offerRequest Flea list creatio offer
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
addPlayerOffer(pmcData: IPmcData, offerRequest: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Is the item to be listed on the flea valid
|
||||
* @param offerRequest Client offer request
|
||||
* @param errorMessage message to show to player when offer is invalid
|
||||
* @returns Is offer valid
|
||||
*/
|
||||
protected isValidPlayerOfferRequest(offerRequest: IAddOfferRequestData, errorMessage: string): boolean;
|
||||
/**
|
||||
* Get the handbook price in roubles for the items being listed
|
||||
* @param requirements
|
||||
* @returns Rouble price
|
||||
*/
|
||||
protected calculateRequirementsPriceInRub(requirements: Requirement[]): number;
|
||||
/**
|
||||
* Using item ids from flea offer request, find corrispnding items from player inventory and return as array
|
||||
* @param pmcData Player profile
|
||||
* @param itemIdsFromFleaOfferRequest Ids from request
|
||||
* @param errorMessage if item is not found, add error message to this parameter
|
||||
* @returns Array of items from player inventory
|
||||
*/
|
||||
protected getItemsToListOnFleaFromInventory(pmcData: IPmcData, itemIdsFromFleaOfferRequest: string[], errorMessage: string): Item[];
|
||||
createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer;
|
||||
getAllFleaPrices(): Record<string, number>;
|
||||
getStaticPrices(): Record<string, number>;
|
||||
|
@ -2,7 +2,7 @@ import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||
import { Health as PmcHealth, IBaseJsonSkills, IBaseSkill, IBotBase, Info, Skills as botSkills } from "../models/eft/common/tables/IBotBase";
|
||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase";
|
||||
import { Health, IBotType } from "../models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
@ -93,9 +93,10 @@ export declare class BotGenerator {
|
||||
/**
|
||||
* Randomise the progress value of passed in skills based on the min/max value
|
||||
* @param skills Skills to randomise
|
||||
* @param isCommonSkills Are the skills 'common' skills
|
||||
* @returns Skills with randomised progress values as an array
|
||||
*/
|
||||
protected getSkillsWithRandomisedProgressValue(skills: IBaseSkill[]): IBaseSkill[];
|
||||
protected getSkillsWithRandomisedProgressValue(skills: Record<string, IBaseSkill>, isCommonSkills: boolean): IBaseSkill[];
|
||||
/**
|
||||
* Generate a random Id for a bot and apply to bots _id and aid value
|
||||
* @param bot bot to update
|
||||
|
@ -9,6 +9,10 @@ import { ItemFilterService } from "../services/ItemFilterService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
type ItemLimit = {
|
||||
current: number;
|
||||
max: number;
|
||||
};
|
||||
export declare class LootGenerator {
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
@ -25,14 +29,11 @@ export declare class LootGenerator {
|
||||
*/
|
||||
createRandomLoot(options: LootRequest): LootItem[];
|
||||
/**
|
||||
* Construct item limit record to hold max and current item count
|
||||
* Construct item limit record to hold max and current item count for each item type
|
||||
* @param limits limits as defined in config
|
||||
* @returns record, key: item tplId, value: current/max item count allowed
|
||||
*/
|
||||
protected initItemLimitCounter(limits: Record<string, number>): Record<string, {
|
||||
current: number;
|
||||
max: number;
|
||||
}>;
|
||||
protected initItemLimitCounter(limits: Record<string, number>): Record<string, ItemLimit>;
|
||||
/**
|
||||
* Find a random item in items.json and add to result array
|
||||
* @param items items to choose from
|
||||
@ -65,3 +66,4 @@ export declare class LootGenerator {
|
||||
max: number;
|
||||
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
||||
}
|
||||
export {};
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
declare class LookupItem {
|
||||
byId: Record<number, string>;
|
||||
byParent: Record<string, string[]>;
|
||||
declare class LookupItem<T, I> {
|
||||
readonly byId: Map<string, T>;
|
||||
readonly byParent: Map<string, I[]>;
|
||||
constructor();
|
||||
}
|
||||
export declare class LookupCollection {
|
||||
items: LookupItem;
|
||||
categories: LookupItem;
|
||||
readonly items: LookupItem<number, string>;
|
||||
readonly categories: LookupItem<string, string>;
|
||||
constructor();
|
||||
}
|
||||
export declare class HandbookHelper {
|
||||
|
@ -6,6 +6,7 @@ import { IHideoutContinuousProductionStartRequestData } from "../models/eft/hide
|
||||
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
|
||||
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -36,7 +37,6 @@ export declare class HideoutHelper {
|
||||
static bitcoin: string;
|
||||
static expeditionaryFuelTank: string;
|
||||
static maxSkillPoint: number;
|
||||
private static generatorOffMultipler;
|
||||
protected hideoutConfig: IHideoutConfig;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
@ -131,9 +131,41 @@ export declare class HideoutHelper {
|
||||
* @returns Updated HideoutArea object
|
||||
*/
|
||||
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
||||
/**
|
||||
* Get the water filter drain rate based on hideout bonues player has
|
||||
* @param pmcData Player profile
|
||||
* @returns Drain rate
|
||||
*/
|
||||
protected getWaterFilterDrainRate(pmcData: IPmcData): number;
|
||||
/**
|
||||
* Get the production time in seconds for the desired production
|
||||
* @param prodId Id, e.g. Water collector id
|
||||
* @returns seconds to produce item
|
||||
*/
|
||||
protected getProductionTimeSeconds(prodId: string): number;
|
||||
/**
|
||||
* Create a upd object using passed in parameters
|
||||
* @param stackCount
|
||||
* @param resourceValue
|
||||
* @param resourceUnitsConsumed
|
||||
* @returns Upd
|
||||
*/
|
||||
protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd;
|
||||
protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): void;
|
||||
protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production;
|
||||
/**
|
||||
* Add bitcoin object to btc production products array and set progress time
|
||||
* @param btcProd Bitcoin production object
|
||||
* @param coinCraftTimeSeconds Time to craft a bitcoin
|
||||
*/
|
||||
protected addBtcToProduction(btcProd: Production, coinCraftTimeSeconds: number): void;
|
||||
/**
|
||||
* Get number of ticks that have passed since hideout areas were last processed, reduced when generator is off
|
||||
* @param pmcData Player profile
|
||||
* @param isGeneratorOn Is the generator on for the duration of elapsed time
|
||||
* @returns Amount of time elapsed in seconds
|
||||
*/
|
||||
protected getTimeElapsedSinceLastServerTick(pmcData: IPmcData, isGeneratorOn: boolean): number;
|
||||
/**
|
||||
* Get a count of how many BTC can be gathered by the profile
|
||||
* @param pmcData Profile to look up
|
||||
@ -180,6 +212,12 @@ export declare class HideoutHelper {
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
getBTC(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionId: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Create a single bitcoin request object
|
||||
* @param pmcData Player profile
|
||||
* @returns IAddItemRequestData
|
||||
*/
|
||||
protected createBitcoinRequest(pmcData: IPmcData): IAddItemRequestData;
|
||||
/**
|
||||
* Upgrade hideout wall from starting level to interactable level if enough time has passed
|
||||
* @param pmcProfile Profile to upgrade wall in
|
||||
|
@ -44,6 +44,12 @@ export declare class InRaidHelper {
|
||||
* @returns adjusted karma level after kills are taken into account
|
||||
*/
|
||||
calculateFenceStandingChangeFromKills(existingFenceStanding: number, victims: Victim[]): number;
|
||||
/**
|
||||
* Get the standing gain/loss for killing an npc
|
||||
* @param victim Who was killed by player
|
||||
* @returns a numerical standing gain or loss
|
||||
*/
|
||||
protected getStandingChangeForKill(victim: Victim): number;
|
||||
/**
|
||||
* Reset a profile to a baseline, used post-raid
|
||||
* Reset points earned during session property
|
||||
@ -79,7 +85,7 @@ export declare class InRaidHelper {
|
||||
* @param preRaidProfile profile to update
|
||||
* @param postRaidProfile profile to update inventory contents of
|
||||
* @param isPlayerScav Was this a p scav raid
|
||||
* @returns
|
||||
* @returns profile with FiR items properly tagged
|
||||
*/
|
||||
addSpawnedInSessionPropertyToItems(preRaidProfile: IPmcData, postRaidProfile: IPmcData, isPlayerScav: boolean): IPmcData;
|
||||
/**
|
||||
@ -107,6 +113,12 @@ export declare class InRaidHelper {
|
||||
* @param sessionID Session id
|
||||
*/
|
||||
deleteInventory(pmcData: IPmcData, sessionID: string): void;
|
||||
/**
|
||||
* Get an array of items from a profile that will be lost on death
|
||||
* @param pmcProfile Profile to get items from
|
||||
* @returns Array of items lost on death
|
||||
*/
|
||||
protected getInventoryItemsLostOnDeath(pmcProfile: IPmcData): Item[];
|
||||
/**
|
||||
* Get items in vest/pocket/backpack inventory containers (excluding children)
|
||||
* @param pmcData Player profile
|
||||
|
@ -84,8 +84,8 @@ export declare class InventoryHelper {
|
||||
*/
|
||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record<number, number>;
|
||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): Record<number, number>;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
||||
protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash;
|
||||
getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][];
|
||||
/**
|
||||
|
@ -120,7 +120,7 @@ declare class ItemHelper {
|
||||
*/
|
||||
protected getRepairableItemQualityValue(itemDetails: ITemplateItem, repairable: Repairable, item: Item): number;
|
||||
/**
|
||||
* Recursive function that looks at every item from parameter and gets their childrens Ids
|
||||
* Recursive function that looks at every item from parameter and gets their childrens Ids + includes parent item in results
|
||||
* @param items
|
||||
* @param itemID
|
||||
* @returns an array of strings
|
||||
|
@ -45,7 +45,16 @@ export declare class ProfileHelper {
|
||||
* @returns updated profile array
|
||||
*/
|
||||
protected postRaidXpWorkaroundFix(sessionId: string, output: IPmcData[], pmcProfile: IPmcData, scavProfile: IPmcData): IPmcData[];
|
||||
isNicknameTaken(info: IValidateNicknameRequestData, sessionID: string): boolean;
|
||||
/**
|
||||
* Check if a nickname is used by another profile loaded by the server
|
||||
* @param nicknameRequest
|
||||
* @param sessionID Session id
|
||||
* @returns True if already used
|
||||
*/
|
||||
isNicknameTaken(nicknameRequest: IValidateNicknameRequestData, sessionID: string): boolean;
|
||||
protected profileHasInfoProperty(profile: IAkiProfile): boolean;
|
||||
protected nicknameMatches(profileName: string, nicknameRequest: string): boolean;
|
||||
protected sessionIdMatchesProfileId(profileId: string, sessionId: string): boolean;
|
||||
/**
|
||||
* Add experience to a PMC inside the players profile
|
||||
* @param sessionID Session id
|
||||
|
@ -55,6 +55,13 @@ export declare class TraderHelper {
|
||||
* @param standingToAdd Standing value to add to trader
|
||||
*/
|
||||
addStandingToTrader(sessionId: string, traderId: string, standingToAdd: number): void;
|
||||
/**
|
||||
* Add standing to current standing and clamp value if it goes too low
|
||||
* @param currentStanding current trader standing
|
||||
* @param standingToAdd stansding to add to trader standing
|
||||
* @returns current standing + added standing (clamped if needed)
|
||||
*/
|
||||
protected addStandingValuesTogether(currentStanding: number, standingToAdd: number): number;
|
||||
/**
|
||||
* Calculate traders level based on exp amount and increments level if over threshold
|
||||
* @param traderID trader to process
|
||||
|
@ -18,6 +18,7 @@ export declare class BundleLoader {
|
||||
getBundles(local: boolean): BundleInfo[];
|
||||
getBundle(key: string, local: boolean): BundleInfo;
|
||||
addBundles(modpath: string): void;
|
||||
addBundle(key: string, b: BundleInfo): void;
|
||||
}
|
||||
export interface BundleManifest {
|
||||
manifest: Array<BundleManifestEntry>;
|
||||
|
@ -7,6 +7,10 @@ export interface ITemplateItem {
|
||||
_proto: string;
|
||||
}
|
||||
export interface Props {
|
||||
AllowSpawnOnLocations?: any[];
|
||||
ChangePriceCoef?: number;
|
||||
FixedPrice?: boolean;
|
||||
SendToClient?: boolean;
|
||||
Name?: string;
|
||||
ShortName?: string;
|
||||
Description?: string;
|
||||
@ -102,7 +106,7 @@ export interface Props {
|
||||
MaskSize?: number;
|
||||
NoiseIntensity?: number;
|
||||
NoiseScale?: number;
|
||||
Color?: Color;
|
||||
Color?: IColor;
|
||||
DiffuseIntensity?: number;
|
||||
HasHinge?: boolean;
|
||||
RampPalette?: string;
|
||||
@ -259,7 +263,7 @@ export interface Props {
|
||||
foodEffectType?: string;
|
||||
StimulatorBuffs?: string;
|
||||
effects_health?: IHealthEffect[] | Record<string, Record<string, number>>;
|
||||
effects_damage?: any;
|
||||
effects_damage?: Record<string, IEffectDamageProps>;
|
||||
MaximumNumberOfUsage?: number;
|
||||
knifeHitDelay?: number;
|
||||
knifeHitSlashRate?: number;
|
||||
@ -443,15 +447,15 @@ export interface EffectsHealthProps {
|
||||
value: number;
|
||||
}
|
||||
export interface EffectsDamage {
|
||||
Pain: EffectDamageProps;
|
||||
LightBleeding: EffectDamageProps;
|
||||
HeavyBleeding: EffectDamageProps;
|
||||
Contusion: EffectDamageProps;
|
||||
RadExposure: EffectDamageProps;
|
||||
Fracture: EffectDamageProps;
|
||||
DestroyedPart: EffectDamageProps;
|
||||
Pain: IEffectDamageProps;
|
||||
LightBleeding: IEffectDamageProps;
|
||||
HeavyBleeding: IEffectDamageProps;
|
||||
Contusion: IEffectDamageProps;
|
||||
RadExposure: IEffectDamageProps;
|
||||
Fracture: IEffectDamageProps;
|
||||
DestroyedPart: IEffectDamageProps;
|
||||
}
|
||||
export interface EffectDamageProps {
|
||||
export interface IEffectDamageProps {
|
||||
delay: number;
|
||||
duration: number;
|
||||
fadeOut: number;
|
||||
@ -459,7 +463,7 @@ export interface EffectDamageProps {
|
||||
healthPenaltyMin?: number;
|
||||
healthPenaltyMax?: number;
|
||||
}
|
||||
export interface Color {
|
||||
export interface IColor {
|
||||
r: number;
|
||||
g: number;
|
||||
b: number;
|
||||
|
@ -82,9 +82,9 @@ export interface ISuit {
|
||||
tid: string;
|
||||
suiteId: string;
|
||||
isActive: boolean;
|
||||
requirements: Requirements;
|
||||
requirements: ISuitRequirements;
|
||||
}
|
||||
export interface Requirements {
|
||||
export interface ISuitRequirements {
|
||||
loyaltyLevel: number;
|
||||
profileLevel: number;
|
||||
standing: number;
|
||||
|
@ -56,7 +56,7 @@ export declare enum BaseClasses {
|
||||
AMMO = "5485a8684bdc2da71d8b4567",
|
||||
AMMO_BOX = "543be5cb4bdc2deb348b4568",
|
||||
LOOT_CONTAINER = "566965d44bdc2d814c8b4571",
|
||||
MOD_CONTAINER = "5448bf274bdc2dfc2f8b456a",
|
||||
MOB_CONTAINER = "5448bf274bdc2dfc2f8b456a",
|
||||
SEARCHABLE_ITEM = "566168634bdc2d144c8b456c",
|
||||
STASH = "566abbb64bdc2d144c8b457d",
|
||||
SORTING_TABLE = "6050cac987d3f925bf016837",
|
||||
|
@ -5,4 +5,6 @@ export interface IHttpConfig extends IBaseConfig {
|
||||
ip: string;
|
||||
port: number;
|
||||
logRequests: boolean;
|
||||
/** e.g. "Aki_Data/Server/images/traders/579dc571d53a0658a154fbec.png": "Aki_Data/Server/images/traders/NewTraderImage.png" */
|
||||
serverImagePathOverride: Record<string, string>;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ export declare class BotGenerationCacheService {
|
||||
*/
|
||||
getBot(key: string): IBotBase;
|
||||
/**
|
||||
* Remove all cached bot profiles
|
||||
* Remove all cached bot profiles from memory
|
||||
*/
|
||||
clearStoredBots(): void;
|
||||
/**
|
||||
|
@ -19,7 +19,7 @@ export declare class BotLootCacheService {
|
||||
protected lootCache: Record<string, IBotLootCache>;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService);
|
||||
/**
|
||||
* Remove all cached bot loot data
|
||||
* Remove cached bot loot data
|
||||
*/
|
||||
clearCache(): void;
|
||||
/**
|
||||
|
@ -106,6 +106,7 @@ export declare class FenceService {
|
||||
protected getCountOfItemsToGenerate(existingItemCountToReplace: number): number;
|
||||
/**
|
||||
* Choose an item (not mod) at random and remove from assorts
|
||||
* @param assort Items to remove from
|
||||
*/
|
||||
protected removeRandomItemFromAssorts(assort: ITraderAssort): void;
|
||||
/**
|
||||
|
@ -50,6 +50,7 @@ export declare class InsuranceService {
|
||||
* @param mapId Id of the map player died/exited that caused the insurance to be issued on
|
||||
*/
|
||||
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
|
||||
protected removeLocationProperty(sessionId: string, traderId: string): void;
|
||||
/**
|
||||
* Get a timestamp of what insurance items should be sent to player based on the type of trader used to insure
|
||||
* @param pmcData Player profile
|
||||
@ -66,6 +67,12 @@ export declare class InsuranceService {
|
||||
* @param playerDied did the player die in raid
|
||||
*/
|
||||
storeLostGear(pmcData: IPmcData, offraidData: ISaveProgressRequestData, preRaidGear: Item[], sessionID: string, playerDied: boolean): void;
|
||||
/**
|
||||
* Create a hash table for an array of items, keyed by items _id
|
||||
* @param items Items to hash
|
||||
* @returns Hashtable
|
||||
*/
|
||||
protected createItemHashTable(items: Item[]): Record<string, Item>;
|
||||
/**
|
||||
* Store insured items on pmc death inside insurance array in player profile
|
||||
* @param pmcData Player profile
|
||||
|
@ -1,16 +1,18 @@
|
||||
import { I18n } from "i18n";
|
||||
import { ILocaleConfig } from "../models/spt/config/ILocaleConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocaleService } from "./LocaleService";
|
||||
/**
|
||||
* Handles translating server text into different langauges
|
||||
*/
|
||||
export declare class LocalisationService {
|
||||
protected logger: ILogger;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected localeService: LocaleService;
|
||||
protected localeConfig: ILocaleConfig;
|
||||
protected i18n: I18n;
|
||||
constructor(logger: ILogger, localeService: LocaleService);
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, localeService: LocaleService);
|
||||
/**
|
||||
* Get a localised value using the passed in key
|
||||
* @param key Key to loop up locale for
|
||||
|
@ -57,6 +57,13 @@ export declare class PaymentService {
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
addPaymentToOutput(pmcData: IPmcData, currencyTpl: string, amountToPay: number, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Get all money stacks in inventory and prioritse items in stash
|
||||
* @param pmcData
|
||||
* @param currencyTpl
|
||||
* @returns Sorting money items
|
||||
*/
|
||||
protected getSortedMoneyItemsInInventory(pmcData: IPmcData, currencyTpl: string): Item[];
|
||||
/**
|
||||
* Prioritise player stash first over player inventory
|
||||
* Post-raid healing would often take money out of the players pockets/secure container
|
||||
|
@ -22,9 +22,9 @@ export declare class RagfairCategoriesService {
|
||||
protected processOffersIntoCategories(offers: IRagfairOffer[]): Record<string, number>;
|
||||
/**
|
||||
* Increment or decrement a category array
|
||||
* @param offer offer to process
|
||||
* @param categories categories to update
|
||||
* @param increment should item be incremented or decremented
|
||||
* @param offer Offer to process
|
||||
* @param categories Categories to update
|
||||
* @param increment (Optional) Should item be incremented or decremented
|
||||
*/
|
||||
protected addOrIncrementCategory(offer: IRagfairOffer, categories: Record<string, number>, increment?: boolean): void;
|
||||
/**
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ImageRouter } from "../routers/ImageRouter";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { EncodingUtil } from "./EncodingUtil";
|
||||
@ -18,10 +20,12 @@ export declare class DatabaseImporter implements OnLoad {
|
||||
protected encodingUtil: EncodingUtil;
|
||||
protected hashUtil: HashUtil;
|
||||
protected importerUtil: ImporterUtil;
|
||||
protected configServer: ConfigServer;
|
||||
private hashedFile;
|
||||
private valid;
|
||||
private filepath;
|
||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil);
|
||||
protected httpConfig: IHttpConfig;
|
||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter, encodingUtil: EncodingUtil, hashUtil: HashUtil, importerUtil: ImporterUtil, configServer: ConfigServer);
|
||||
onLoad(): Promise<void>;
|
||||
/**
|
||||
* Read all json files in database folder and map into a json object
|
||||
@ -31,5 +35,15 @@ export declare class DatabaseImporter implements OnLoad {
|
||||
private onReadValidate;
|
||||
getRoute(): string;
|
||||
private validateFile;
|
||||
loadImages(filepath: string): void;
|
||||
/**
|
||||
* Find and map files with image router inside a designated path
|
||||
* @param filepath Path to find files in
|
||||
*/
|
||||
loadImages(filepath: string, routes: string[]): void;
|
||||
/**
|
||||
* Check for a path override in the http json config file
|
||||
* @param imagePath Key
|
||||
* @returns override for key
|
||||
*/
|
||||
protected getImagePathOverride(imagePath: string): string;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { ISuit } from "../models/eft/common/tables/ITrader";
|
||||
import { IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
||||
import { ClothingItem, IBuyClothingRequestData } from "../models/eft/customization/IBuyClothingRequestData";
|
||||
import { IWearClothingRequestData } from "../models/eft/customization/IWearClothingRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -18,7 +18,32 @@ export declare class CustomizationController {
|
||||
protected profileHelper: ProfileHelper;
|
||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
||||
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
||||
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
wearClothing(pmcData: IPmcData, wearClothingRequest: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
buyClothing(pmcData: IPmcData, buyClothingRequest: IBuyClothingRequestData, sessionId: string): IItemEventRouterResponse;
|
||||
protected getTraderClothingOffer(sessionId: string, offerId: string): ISuit;
|
||||
/**
|
||||
* Has an outfit been purchased by a player
|
||||
* @param suitId clothing id
|
||||
* @param sessionID Session id
|
||||
* @returns true/false
|
||||
*/
|
||||
protected outfitAlreadyPurchased(suitId: string, sessionID: string): boolean;
|
||||
/**
|
||||
* Update output object and player profile with purchase details
|
||||
* @param sessionId Session id
|
||||
* @param pmcData Player profile
|
||||
* @param clothingItems Clothing purchased
|
||||
* @param output Client response
|
||||
*/
|
||||
protected payForClothingItems(sessionId: string, pmcData: IPmcData, clothingItems: ClothingItem[], output: IItemEventRouterResponse): void;
|
||||
/**
|
||||
* Update output object and player profile with purchase details for single piece of clothing
|
||||
* @param sessionId Session id
|
||||
* @param pmcData Player profile
|
||||
* @param clothingItem Clothing item purchased
|
||||
* @param output Client response
|
||||
* @returns
|
||||
*/
|
||||
protected payForClothingItem(sessionId: string, pmcData: IPmcData, clothingItem: ClothingItem, output: IItemEventRouterResponse): void;
|
||||
protected getAllTraderSuits(sessionID: string): ISuit[];
|
||||
}
|
||||
|
@ -73,8 +73,20 @@ export declare class DialogueController {
|
||||
*/
|
||||
protected getMessagesWithAttachments(messages: Message[]): Message[];
|
||||
/**
|
||||
* Delete expired items. triggers when updating traders.
|
||||
* @param sessionID Session id
|
||||
* Delete expired items from all messages in player profile. triggers when updating traders.
|
||||
* @param sessionId Session id
|
||||
*/
|
||||
protected removeExpiredItems(sessionID: string): void;
|
||||
protected removeExpiredItemsFromMessages(sessionId: string): void;
|
||||
/**
|
||||
* Removes expired items from a message in player profile
|
||||
* @param sessionId Session id
|
||||
* @param dialogueId Dialog id
|
||||
*/
|
||||
protected removeExpiredItemsFromMessage(sessionId: string, dialogueId: string): void;
|
||||
/**
|
||||
* Has a dialog message expired
|
||||
* @param message Message to check expiry of
|
||||
* @returns true or false
|
||||
*/
|
||||
protected messageHasExpired(message: Message): boolean;
|
||||
}
|
||||
|
@ -137,9 +137,9 @@ export declare class HideoutController {
|
||||
* Add generated scav case rewards to player profile
|
||||
* @param pmcData player profile to add rewards to
|
||||
* @param rewards reward items to add to profile
|
||||
* @param recipieId recipie id to save into Production dict
|
||||
* @param recipeId recipe id to save into Production dict
|
||||
*/
|
||||
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[], recipieId: string): void;
|
||||
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[], recipeId: string): void;
|
||||
/**
|
||||
* Start production of continuously created item
|
||||
* @param pmcData Player profile
|
||||
@ -157,15 +157,15 @@ export declare class HideoutController {
|
||||
*/
|
||||
takeProduction(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Take recipie-type production out of hideout area and place into player inventory
|
||||
* Take recipe-type production out of hideout area and place into player inventory
|
||||
* @param sessionID Session id
|
||||
* @param recipe Completed recipie of item
|
||||
* @param recipe Completed recipe of item
|
||||
* @param pmcData Player profile
|
||||
* @param request Remove production from area request
|
||||
* @param output Output object to update
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
protected handleRecipe(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles giving rewards stored in player profile to player after clicking 'get rewards'
|
||||
* @param sessionID Session id
|
||||
|
@ -53,5 +53,25 @@ export declare class MatchController {
|
||||
* @returns bot difficulty
|
||||
*/
|
||||
protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string;
|
||||
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
|
||||
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void;
|
||||
/**
|
||||
* Is extract by car
|
||||
* @param extractName name of extract
|
||||
* @returns true if car extract
|
||||
*/
|
||||
protected extractWasViaCar(extractName: string): boolean;
|
||||
/**
|
||||
* Handle when a player extracts using a car - Add rep to fence
|
||||
* @param extractName name of the extract used
|
||||
* @param pmcData Player profile
|
||||
* @param sessionId Session id
|
||||
*/
|
||||
protected handleCarExtract(extractName: string, pmcData: IPmcData, sessionId: string): void;
|
||||
/**
|
||||
* Update players fence trader standing value in profile
|
||||
* @param pmcData Player profile
|
||||
* @param fenceId Id of fence trader
|
||||
* @param extractName Name of extract used
|
||||
*/
|
||||
protected updateFenceStandingInProfile(pmcData: IPmcData, fenceId: string, extractName: string): void;
|
||||
}
|
||||
|
@ -117,7 +117,35 @@ export declare class RagfairController {
|
||||
* @returns min/avg/max values for an item based on flea offers available
|
||||
*/
|
||||
getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult;
|
||||
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* List item(s) on flea for sale
|
||||
* @param pmcData Player profile
|
||||
* @param offerRequest Flea list creatio offer
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
addPlayerOffer(pmcData: IPmcData, offerRequest: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Is the item to be listed on the flea valid
|
||||
* @param offerRequest Client offer request
|
||||
* @param errorMessage message to show to player when offer is invalid
|
||||
* @returns Is offer valid
|
||||
*/
|
||||
protected isValidPlayerOfferRequest(offerRequest: IAddOfferRequestData, errorMessage: string): boolean;
|
||||
/**
|
||||
* Get the handbook price in roubles for the items being listed
|
||||
* @param requirements
|
||||
* @returns Rouble price
|
||||
*/
|
||||
protected calculateRequirementsPriceInRub(requirements: Requirement[]): number;
|
||||
/**
|
||||
* Using item ids from flea offer request, find corrispnding items from player inventory and return as array
|
||||
* @param pmcData Player profile
|
||||
* @param itemIdsFromFleaOfferRequest Ids from request
|
||||
* @param errorMessage if item is not found, add error message to this parameter
|
||||
* @returns Array of items from player inventory
|
||||
*/
|
||||
protected getItemsToListOnFleaFromInventory(pmcData: IPmcData, itemIdsFromFleaOfferRequest: string[], errorMessage: string): Item[];
|
||||
createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer;
|
||||
getAllFleaPrices(): Record<string, number>;
|
||||
getStaticPrices(): Record<string, number>;
|
||||
|
@ -2,7 +2,7 @@ import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||
import { Health as PmcHealth, IBaseJsonSkills, IBaseSkill, IBotBase, Info, Skills as botSkills } from "../models/eft/common/tables/IBotBase";
|
||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase";
|
||||
import { Health, IBotType } from "../models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
@ -93,9 +93,10 @@ export declare class BotGenerator {
|
||||
/**
|
||||
* Randomise the progress value of passed in skills based on the min/max value
|
||||
* @param skills Skills to randomise
|
||||
* @param isCommonSkills Are the skills 'common' skills
|
||||
* @returns Skills with randomised progress values as an array
|
||||
*/
|
||||
protected getSkillsWithRandomisedProgressValue(skills: IBaseSkill[]): IBaseSkill[];
|
||||
protected getSkillsWithRandomisedProgressValue(skills: Record<string, IBaseSkill>, isCommonSkills: boolean): IBaseSkill[];
|
||||
/**
|
||||
* Generate a random Id for a bot and apply to bots _id and aid value
|
||||
* @param bot bot to update
|
||||
|
@ -9,6 +9,10 @@ import { ItemFilterService } from "../services/ItemFilterService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
type ItemLimit = {
|
||||
current: number;
|
||||
max: number;
|
||||
};
|
||||
export declare class LootGenerator {
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
@ -25,14 +29,11 @@ export declare class LootGenerator {
|
||||
*/
|
||||
createRandomLoot(options: LootRequest): LootItem[];
|
||||
/**
|
||||
* Construct item limit record to hold max and current item count
|
||||
* Construct item limit record to hold max and current item count for each item type
|
||||
* @param limits limits as defined in config
|
||||
* @returns record, key: item tplId, value: current/max item count allowed
|
||||
*/
|
||||
protected initItemLimitCounter(limits: Record<string, number>): Record<string, {
|
||||
current: number;
|
||||
max: number;
|
||||
}>;
|
||||
protected initItemLimitCounter(limits: Record<string, number>): Record<string, ItemLimit>;
|
||||
/**
|
||||
* Find a random item in items.json and add to result array
|
||||
* @param items items to choose from
|
||||
@ -65,3 +66,4 @@ export declare class LootGenerator {
|
||||
max: number;
|
||||
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
||||
}
|
||||
export {};
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
declare class LookupItem {
|
||||
byId: Record<number, string>;
|
||||
byParent: Record<string, string[]>;
|
||||
declare class LookupItem<T, I> {
|
||||
readonly byId: Map<string, T>;
|
||||
readonly byParent: Map<string, I[]>;
|
||||
constructor();
|
||||
}
|
||||
export declare class LookupCollection {
|
||||
items: LookupItem;
|
||||
categories: LookupItem;
|
||||
readonly items: LookupItem<number, string>;
|
||||
readonly categories: LookupItem<string, string>;
|
||||
constructor();
|
||||
}
|
||||
export declare class HandbookHelper {
|
||||
|
@ -6,6 +6,7 @@ import { IHideoutContinuousProductionStartRequestData } from "../models/eft/hide
|
||||
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
|
||||
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -36,7 +37,6 @@ export declare class HideoutHelper {
|
||||
static bitcoin: string;
|
||||
static expeditionaryFuelTank: string;
|
||||
static maxSkillPoint: number;
|
||||
private static generatorOffMultipler;
|
||||
protected hideoutConfig: IHideoutConfig;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
@ -131,9 +131,41 @@ export declare class HideoutHelper {
|
||||
* @returns Updated HideoutArea object
|
||||
*/
|
||||
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
||||
/**
|
||||
* Get the water filter drain rate based on hideout bonues player has
|
||||
* @param pmcData Player profile
|
||||
* @returns Drain rate
|
||||
*/
|
||||
protected getWaterFilterDrainRate(pmcData: IPmcData): number;
|
||||
/**
|
||||
* Get the production time in seconds for the desired production
|
||||
* @param prodId Id, e.g. Water collector id
|
||||
* @returns seconds to produce item
|
||||
*/
|
||||
protected getProductionTimeSeconds(prodId: string): number;
|
||||
/**
|
||||
* Create a upd object using passed in parameters
|
||||
* @param stackCount
|
||||
* @param resourceValue
|
||||
* @param resourceUnitsConsumed
|
||||
* @returns Upd
|
||||
*/
|
||||
protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd;
|
||||
protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): void;
|
||||
protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production;
|
||||
/**
|
||||
* Add bitcoin object to btc production products array and set progress time
|
||||
* @param btcProd Bitcoin production object
|
||||
* @param coinCraftTimeSeconds Time to craft a bitcoin
|
||||
*/
|
||||
protected addBtcToProduction(btcProd: Production, coinCraftTimeSeconds: number): void;
|
||||
/**
|
||||
* Get number of ticks that have passed since hideout areas were last processed, reduced when generator is off
|
||||
* @param pmcData Player profile
|
||||
* @param isGeneratorOn Is the generator on for the duration of elapsed time
|
||||
* @returns Amount of time elapsed in seconds
|
||||
*/
|
||||
protected getTimeElapsedSinceLastServerTick(pmcData: IPmcData, isGeneratorOn: boolean): number;
|
||||
/**
|
||||
* Get a count of how many BTC can be gathered by the profile
|
||||
* @param pmcData Profile to look up
|
||||
@ -180,6 +212,12 @@ export declare class HideoutHelper {
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
getBTC(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionId: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Create a single bitcoin request object
|
||||
* @param pmcData Player profile
|
||||
* @returns IAddItemRequestData
|
||||
*/
|
||||
protected createBitcoinRequest(pmcData: IPmcData): IAddItemRequestData;
|
||||
/**
|
||||
* Upgrade hideout wall from starting level to interactable level if enough time has passed
|
||||
* @param pmcProfile Profile to upgrade wall in
|
||||
|
@ -44,6 +44,12 @@ export declare class InRaidHelper {
|
||||
* @returns adjusted karma level after kills are taken into account
|
||||
*/
|
||||
calculateFenceStandingChangeFromKills(existingFenceStanding: number, victims: Victim[]): number;
|
||||
/**
|
||||
* Get the standing gain/loss for killing an npc
|
||||
* @param victim Who was killed by player
|
||||
* @returns a numerical standing gain or loss
|
||||
*/
|
||||
protected getStandingChangeForKill(victim: Victim): number;
|
||||
/**
|
||||
* Reset a profile to a baseline, used post-raid
|
||||
* Reset points earned during session property
|
||||
@ -79,7 +85,7 @@ export declare class InRaidHelper {
|
||||
* @param preRaidProfile profile to update
|
||||
* @param postRaidProfile profile to update inventory contents of
|
||||
* @param isPlayerScav Was this a p scav raid
|
||||
* @returns
|
||||
* @returns profile with FiR items properly tagged
|
||||
*/
|
||||
addSpawnedInSessionPropertyToItems(preRaidProfile: IPmcData, postRaidProfile: IPmcData, isPlayerScav: boolean): IPmcData;
|
||||
/**
|
||||
@ -107,6 +113,12 @@ export declare class InRaidHelper {
|
||||
* @param sessionID Session id
|
||||
*/
|
||||
deleteInventory(pmcData: IPmcData, sessionID: string): void;
|
||||
/**
|
||||
* Get an array of items from a profile that will be lost on death
|
||||
* @param pmcProfile Profile to get items from
|
||||
* @returns Array of items lost on death
|
||||
*/
|
||||
protected getInventoryItemsLostOnDeath(pmcProfile: IPmcData): Item[];
|
||||
/**
|
||||
* Get items in vest/pocket/backpack inventory containers (excluding children)
|
||||
* @param pmcData Player profile
|
||||
|
@ -84,8 +84,8 @@ export declare class InventoryHelper {
|
||||
*/
|
||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record<number, number>;
|
||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): Record<number, number>;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
||||
protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash;
|
||||
getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][];
|
||||
/**
|
||||
|
@ -120,7 +120,7 @@ declare class ItemHelper {
|
||||
*/
|
||||
protected getRepairableItemQualityValue(itemDetails: ITemplateItem, repairable: Repairable, item: Item): number;
|
||||
/**
|
||||
* Recursive function that looks at every item from parameter and gets their childrens Ids
|
||||
* Recursive function that looks at every item from parameter and gets their childrens Ids + includes parent item in results
|
||||
* @param items
|
||||
* @param itemID
|
||||
* @returns an array of strings
|
||||
|
@ -45,7 +45,16 @@ export declare class ProfileHelper {
|
||||
* @returns updated profile array
|
||||
*/
|
||||
protected postRaidXpWorkaroundFix(sessionId: string, output: IPmcData[], pmcProfile: IPmcData, scavProfile: IPmcData): IPmcData[];
|
||||
isNicknameTaken(info: IValidateNicknameRequestData, sessionID: string): boolean;
|
||||
/**
|
||||
* Check if a nickname is used by another profile loaded by the server
|
||||
* @param nicknameRequest
|
||||
* @param sessionID Session id
|
||||
* @returns True if already used
|
||||
*/
|
||||
isNicknameTaken(nicknameRequest: IValidateNicknameRequestData, sessionID: string): boolean;
|
||||
protected profileHasInfoProperty(profile: IAkiProfile): boolean;
|
||||
protected nicknameMatches(profileName: string, nicknameRequest: string): boolean;
|
||||
protected sessionIdMatchesProfileId(profileId: string, sessionId: string): boolean;
|
||||
/**
|
||||
* Add experience to a PMC inside the players profile
|
||||
* @param sessionID Session id
|
||||
|
@ -55,6 +55,13 @@ export declare class TraderHelper {
|
||||
* @param standingToAdd Standing value to add to trader
|
||||
*/
|
||||
addStandingToTrader(sessionId: string, traderId: string, standingToAdd: number): void;
|
||||
/**
|
||||
* Add standing to current standing and clamp value if it goes too low
|
||||
* @param currentStanding current trader standing
|
||||
* @param standingToAdd stansding to add to trader standing
|
||||
* @returns current standing + added standing (clamped if needed)
|
||||
*/
|
||||
protected addStandingValuesTogether(currentStanding: number, standingToAdd: number): number;
|
||||
/**
|
||||
* Calculate traders level based on exp amount and increments level if over threshold
|
||||
* @param traderID trader to process
|
||||
|
@ -18,6 +18,7 @@ export declare class BundleLoader {
|
||||
getBundles(local: boolean): BundleInfo[];
|
||||
getBundle(key: string, local: boolean): BundleInfo;
|
||||
addBundles(modpath: string): void;
|
||||
addBundle(key: string, b: BundleInfo): void;
|
||||
}
|
||||
export interface BundleManifest {
|
||||
manifest: Array<BundleManifestEntry>;
|
||||
|
@ -7,6 +7,10 @@ export interface ITemplateItem {
|
||||
_proto: string;
|
||||
}
|
||||
export interface Props {
|
||||
AllowSpawnOnLocations?: any[];
|
||||
ChangePriceCoef?: number;
|
||||
FixedPrice?: boolean;
|
||||
SendToClient?: boolean;
|
||||
Name?: string;
|
||||
ShortName?: string;
|
||||
Description?: string;
|
||||
@ -102,7 +106,7 @@ export interface Props {
|
||||
MaskSize?: number;
|
||||
NoiseIntensity?: number;
|
||||
NoiseScale?: number;
|
||||
Color?: Color;
|
||||
Color?: IColor;
|
||||
DiffuseIntensity?: number;
|
||||
HasHinge?: boolean;
|
||||
RampPalette?: string;
|
||||
@ -259,7 +263,7 @@ export interface Props {
|
||||
foodEffectType?: string;
|
||||
StimulatorBuffs?: string;
|
||||
effects_health?: IHealthEffect[] | Record<string, Record<string, number>>;
|
||||
effects_damage?: any;
|
||||
effects_damage?: Record<string, IEffectDamageProps>;
|
||||
MaximumNumberOfUsage?: number;
|
||||
knifeHitDelay?: number;
|
||||
knifeHitSlashRate?: number;
|
||||
@ -443,15 +447,15 @@ export interface EffectsHealthProps {
|
||||
value: number;
|
||||
}
|
||||
export interface EffectsDamage {
|
||||
Pain: EffectDamageProps;
|
||||
LightBleeding: EffectDamageProps;
|
||||
HeavyBleeding: EffectDamageProps;
|
||||
Contusion: EffectDamageProps;
|
||||
RadExposure: EffectDamageProps;
|
||||
Fracture: EffectDamageProps;
|
||||
DestroyedPart: EffectDamageProps;
|
||||
Pain: IEffectDamageProps;
|
||||
LightBleeding: IEffectDamageProps;
|
||||
HeavyBleeding: IEffectDamageProps;
|
||||
Contusion: IEffectDamageProps;
|
||||
RadExposure: IEffectDamageProps;
|
||||
Fracture: IEffectDamageProps;
|
||||
DestroyedPart: IEffectDamageProps;
|
||||
}
|
||||
export interface EffectDamageProps {
|
||||
export interface IEffectDamageProps {
|
||||
delay: number;
|
||||
duration: number;
|
||||
fadeOut: number;
|
||||
@ -459,7 +463,7 @@ export interface EffectDamageProps {
|
||||
healthPenaltyMin?: number;
|
||||
healthPenaltyMax?: number;
|
||||
}
|
||||
export interface Color {
|
||||
export interface IColor {
|
||||
r: number;
|
||||
g: number;
|
||||
b: number;
|
||||
|
@ -82,9 +82,9 @@ export interface ISuit {
|
||||
tid: string;
|
||||
suiteId: string;
|
||||
isActive: boolean;
|
||||
requirements: Requirements;
|
||||
requirements: ISuitRequirements;
|
||||
}
|
||||
export interface Requirements {
|
||||
export interface ISuitRequirements {
|
||||
loyaltyLevel: number;
|
||||
profileLevel: number;
|
||||
standing: number;
|
||||
|
@ -56,7 +56,7 @@ export declare enum BaseClasses {
|
||||
AMMO = "5485a8684bdc2da71d8b4567",
|
||||
AMMO_BOX = "543be5cb4bdc2deb348b4568",
|
||||
LOOT_CONTAINER = "566965d44bdc2d814c8b4571",
|
||||
MOD_CONTAINER = "5448bf274bdc2dfc2f8b456a",
|
||||
MOB_CONTAINER = "5448bf274bdc2dfc2f8b456a",
|
||||
SEARCHABLE_ITEM = "566168634bdc2d144c8b456c",
|
||||
STASH = "566abbb64bdc2d144c8b457d",
|
||||
SORTING_TABLE = "6050cac987d3f925bf016837",
|
||||
|
@ -5,4 +5,6 @@ export interface IHttpConfig extends IBaseConfig {
|
||||
ip: string;
|
||||
port: number;
|
||||
logRequests: boolean;
|
||||
/** e.g. "Aki_Data/Server/images/traders/579dc571d53a0658a154fbec.png": "Aki_Data/Server/images/traders/NewTraderImage.png" */
|
||||
serverImagePathOverride: Record<string, string>;
|
||||
}
|
||||
|
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