Additional code comments

This commit is contained in:
Dev 2023-07-15 14:49:25 +01:00
parent 5e3d3f5bd7
commit 295ed59739
28 changed files with 153 additions and 75 deletions

View File

@ -179,12 +179,14 @@ export class DialogueCallbacks implements OnUpdate
return this.httpResponse.getBody(true);
}
/** Handle client/friend/delete */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData
{
return this.httpResponse.nullResponse();
}
/** Handle client/friend/ignore/set */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>
{

View File

@ -48,7 +48,7 @@ export class HideoutCallbacks implements OnUpdate
}
/**
* Handle HideoutUpgrade
* Handle HideoutUpgrade event
*/
public upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse
{
@ -56,7 +56,7 @@ export class HideoutCallbacks implements OnUpdate
}
/**
* Handle HideoutUpgradeComplete
* Handle HideoutUpgradeComplete event
*/
public upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse
{
@ -72,7 +72,7 @@ export class HideoutCallbacks implements OnUpdate
}
/**
* Handle HideoutTakeItemsFromAreaSlots
* Handle HideoutTakeItemsFromAreaSlots event
*/
public takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse
{
@ -80,7 +80,7 @@ export class HideoutCallbacks implements OnUpdate
}
/**
* Handle HideoutToggleArea
* Handle HideoutToggleArea event
*/
public toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse
{
@ -88,7 +88,7 @@ export class HideoutCallbacks implements OnUpdate
}
/**
* Handle HideoutSingleProductionStart
* Handle HideoutSingleProductionStart event
*/
public singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse
{
@ -96,7 +96,7 @@ export class HideoutCallbacks implements OnUpdate
}
/**
* Handle HideoutScavCaseProductionStart
* Handle HideoutScavCaseProductionStart event
*/
public scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse
{
@ -112,7 +112,7 @@ export class HideoutCallbacks implements OnUpdate
}
/**
* Handle HideoutTakeProduction
* Handle HideoutTakeProduction event
*/
public takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse
{

View File

@ -20,6 +20,7 @@ export class InraidCallbacks
/**
* Handle client/location/getLocalloot
* Store active map in profile + applicationContext
* @param url
* @param info register player request
* @param sessionID Session id

View File

@ -66,6 +66,7 @@ export class InventoryCallbacks
return this.inventoryController.transferItem(pmcData, body, sessionID);
}
/** Handle Swap */
// TODO: how is this triggered
public swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse
{
@ -97,11 +98,13 @@ export class InventoryCallbacks
return this.inventoryController.examineItem(pmcData, body, sessionID);
}
/** Handle ReadEncyclopedia */
public readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse
{
return this.inventoryController.readEncyclopedia(pmcData, body, sessionID);
}
/** Handle ApplyInventoryChanges */
public sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse
{
return this.inventoryController.sortInventory(pmcData, body, sessionID);
@ -122,6 +125,7 @@ export class InventoryCallbacks
return this.inventoryController.editMapMarker(pmcData, body, sessionID);
}
/** Handle OpenRandomLootContainer */
public openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse
{
return this.inventoryController.openRandomLootContainer(pmcData, body, sessionID);

View File

@ -19,18 +19,21 @@ export class LocationCallbacks
)
{ }
/** Handle client/locations */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public getLocationData(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILocationsGenerateAllResponse>
{
return this.httpResponse.getBody(this.locationController.generateAll());
}
/** Handle client/location/getLocalloot */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public getLocation(url: string, info: IGetLocationRequestData, sessionID: string): IGetBodyResponseData<ILocationBase>
{
return this.httpResponse.getBody(this.locationController.get(info.locationId));
}
/** Handle client/location/getAirdropLoot */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public getAirdropLoot(url: string, info: IEmptyRequestData, sessionID: string): string
{

View File

@ -37,6 +37,7 @@ export class MatchCallbacks
)
{ }
/** Handle client/match/updatePing */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public updatePing(url: string, info: IUpdatePingRequestData, sessionID: string): INullResponseData
{
@ -50,6 +51,7 @@ export class MatchCallbacks
return this.httpResponse.nullResponse();
}
/** Handle client/match/group/exit_from_menu */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData
{
@ -68,6 +70,7 @@ export class MatchCallbacks
return this.httpResponse.nullResponse();
}
/** Handle client/match/group/invite/send */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData<string>
{
@ -97,6 +100,7 @@ export class MatchCallbacks
return this.httpResponse.getBody(true);
}
/** Handle client/match/group/invite/cancel-all */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData
{
@ -109,6 +113,7 @@ export class MatchCallbacks
return this.httpResponse.nullResponse();
}
/** Handle raid/profile/list */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>
{
@ -129,12 +134,13 @@ export class MatchCallbacks
return this.httpResponse.getBody(output);
}
// Handle match/group/start_game
/** Handle match/group/start_game */
public joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult>
{
return this.httpResponse.getBody(this.matchController.joinMatch(info, sessionID));
}
/** Handle client/getMetricsConfig */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>
{
@ -151,11 +157,13 @@ export class MatchCallbacks
return this.httpResponse.getBody(this.matchController.getGroupStatus(info));
}
/** Handle client/match/group/create */
public createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>
{
return this.httpResponse.getBody(this.matchController.createGroup(sessionID, info));
}
/** Handle client/match/group/delete */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public deleteGroup(url: string, info: any, sessionID: string): INullResponseData
{
@ -170,18 +178,21 @@ export class MatchCallbacks
return this.httpResponse.getBody(true);
}
/** Handle client/match/group/player/remove */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData
{
return this.httpResponse.nullResponse();
}
/** Handle client/match/offline/end */
public endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData
{
this.matchController.endOfflineRaid(info, sessionID);
return this.httpResponse.nullResponse();
}
/** Handle client/raid/configuration */
public getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData
{
this.matchController.startOfflineRaid(info, sessionID);

View File

@ -12,16 +12,19 @@ export class NoteCallbacks
@inject("NoteController") protected noteController: NoteController)
{ }
/** Handle AddNote event */
public addNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse
{
return this.noteController.addNote(pmcData, body, sessionID);
}
/** Handle EditNote event */
public editNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse
{
return this.noteController.editNote(pmcData, body, sessionID);
}
/** Handle DeleteNote event */
public deleteNote(pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse
{
return this.noteController.deleteNote(pmcData, body, sessionID);

View File

@ -39,12 +39,15 @@ export class NotifierCallbacks
.then((text) => this.httpServerHelper.sendTextJson(resp, text));
}
/** Handle push/notifier/get */
/** Handle push/notifier/getwebsocket */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>
{
return this.httpResponse.emptyArrayResponse();
}
/** Handle client/notifier/channel/create */
public createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>
{
return this.httpResponse.getBody(this.notifierController.getChannel(sessionID));

View File

@ -19,16 +19,19 @@ export class PresetBuildCallbacks
@inject("PresetBuildController") protected presetBuildController: PresetBuildController)
{ }
/** Handle client/handbook/builds/my/list */
public getHandbookUserlist(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<WeaponBuild[]>
{
return this.httpResponse.getBody(this.presetBuildController.getUserBuilds(sessionID));
}
/** Handle SaveBuild event */
public saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse
{
return this.presetBuildController.saveBuild(pmcData, body, sessionID);
}
/** Handle RemoveBuild event*/
public removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse
{
return this.presetBuildController.removeBuild(pmcData, body, sessionID);

View File

@ -52,42 +52,6 @@ export class RagfairCallbacks implements OnLoad, OnUpdate
return "aki-ragfair";
}
public search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>
{
return this.httpResponse.getBody(this.ragfairController.getOffers(sessionID, info));
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>
{
return this.httpResponse.getBody(this.ragfairController.getItemMinAvgMaxFleaPriceValues(info));
}
public addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse
{
return this.ragfairController.addPlayerOffer(pmcData, info, sessionID);
}
public removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse
{
return this.ragfairController.removeOffer(info.offerId, sessionID);
}
public extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse
{
return this.ragfairController.extendOffer(info, sessionID);
}
/**
* Handle /client/items/prices
* Called when clicking an item to list on flea
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, number>>
{
return this.httpResponse.getBody(this.ragfairController.getAllFleaPrices());
}
public async onUpdate(timeSinceLastRun: number): Promise<boolean>
{
if (timeSinceLastRun > this.ragfairConfig.runIntervalSeconds)
@ -104,6 +68,51 @@ export class RagfairCallbacks implements OnLoad, OnUpdate
return false;
}
/**
* Handle client/ragfair/search
* Handle client/ragfair/find
*/
public search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>
{
return this.httpResponse.getBody(this.ragfairController.getOffers(sessionID, info));
}
/** Handle client/ragfair/itemMarketPrice */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>
{
return this.httpResponse.getBody(this.ragfairController.getItemMinAvgMaxFleaPriceValues(info));
}
/** Handle RagFairAddOffer event */
public addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse
{
return this.ragfairController.addPlayerOffer(pmcData, info, sessionID);
}
/** \Handle RagFairRemoveOffer event */
public removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse
{
return this.ragfairController.removeOffer(info.offerId, sessionID);
}
/** Handle RagFairRenewOffer event */
public extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse
{
return this.ragfairController.extendOffer(info, sessionID);
}
/**
* Handle /client/items/prices
* Called when clicking an item to list on flea
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, number>>
{
return this.httpResponse.getBody(this.ragfairController.getAllFleaPrices());
}
/** Handle client/reports/ragfair/send */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData
{

View File

@ -16,26 +16,28 @@ export class RepairCallbacks
{ }
/**
* Handle TraderRepair event
* use trader to repair item
* @param pmcData
* @param body
* @param sessionID
* @returns
* @param pmcData Player profile
* @param traderRepairRequest Request object
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
public traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse
public traderRepair(pmcData: IPmcData, traderRepairRequest: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse
{
return this.repairController.traderRepair(sessionID, body, pmcData);
return this.repairController.traderRepair(sessionID, traderRepairRequest, pmcData);
}
/**
* Handle Repair event
* Use repair kit to repair item
* @param pmcData
* @param body
* @param sessionID
* @returns
* @param pmcData Player profile
* @param repairRequest Request object
* @param sessionID Session id
* @returns IItemEventRouterResponse
*/
public repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse
public repair(pmcData: IPmcData, repairRequest: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse
{
return this.repairController.repairWithKit(sessionID, body, pmcData);
return this.repairController.repairWithKit(sessionID, repairRequest, pmcData);
}
}

View File

@ -17,7 +17,7 @@ export class TradeCallbacks
{ }
/**
* Handle client/game/profile/items/moving TradingConfirm
* Handle client/game/profile/items/moving TradingConfirm event
*/
public processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse
{
@ -25,6 +25,7 @@ export class TradeCallbacks
return this.tradeController.confirmTrading(pmcData, body, sessionID);
}
/** Handle RagFairBuyOffer event */
public processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse
{
return this.tradeController.confirmRagfairTrading(pmcData, body, sessionID);

View File

@ -31,17 +31,20 @@ export class TraderCallbacks implements OnLoad, OnUpdate
return "aki-traders";
}
/** Handle client/trading/api/traderSettings */
public getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase[]>
{
return this.httpResponse.getBody(this.traderController.getAllTraders(sessionID));
}
/** Handle client/trading/api/getTrader */
public getTrader(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase>
{
const traderID = url.replace("/client/trading/api/getTrader/", "");
return this.httpResponse.getBody(this.traderController.getTrader(sessionID, traderID));
}
/** Handle client/trading/api/getTraderAssort */
public getAssort(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderAssort>
{
const traderID = url.replace("/client/trading/api/getTraderAssort/", "");

View File

@ -12,11 +12,13 @@ export class WishlistCallbacks
@inject("WishlistController") protected wishlistController: WishlistController)
{ }
/** Handle AddToWishList event */
public addToWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse
{
return this.wishlistController.addToWishList(pmcData, body, sessionID);
}
/** Handle RemoveFromWishList event */
public removeFromWishlist(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse
{
return this.wishlistController.removeFromWishList(pmcData, body, sessionID);

View File

@ -61,6 +61,7 @@ export class BotController
}
/**
* Handle singleplayer/settings/bot/difficulty
* Get the core.json difficulty settings from database\bots
* @returns IBotCore
*/

View File

@ -88,6 +88,7 @@ export class HideoutController
}
/**
* Handle HideoutUpgrade event
* Start a hideout area upgrade
* @param pmcData Player profile
* @param request upgrade start request
@ -158,6 +159,7 @@ export class HideoutController
}
/**
* Handle HideoutUpgradeComplete event
* Complete a hideout area upgrade
* @param pmcData Player profile
* @param request Completed upgrade request
@ -259,6 +261,7 @@ export class HideoutController
}
/**
* Handle HideoutTakeItemsFromAreaSlots event
* Remove item from hideout area and place into player inventory
* @param pmcData Player profile
* @param request Take item out of area request
@ -333,6 +336,7 @@ export class HideoutController
}
/**
* Handle HideoutToggleArea event
* Toggle area on/off
* @param pmcData Player profile
* @param request Toggle area request
@ -356,6 +360,7 @@ export class HideoutController
}
/**
* Handle HideoutSingleProductionStart event
* Start production for an item from hideout area
* @param pmcData Player profile
* @param body Start prodution of single item request
@ -392,6 +397,7 @@ export class HideoutController
}
/**
* Handle HideoutScavCaseProductionStart event
* Handles event after clicking 'start' on the scav case hideout page
* @param pmcData player profile
* @param body client request object
@ -486,6 +492,7 @@ export class HideoutController
}
/**
* Handle HideoutTakeProduction event
* Take completed item out of hideout area and place into player inventory
* @param pmcData Player profile
* @param request Remove production from area request

View File

@ -74,6 +74,7 @@ export class InraidController
}
/**
* Handle raid/profile/save
* Save profile state to disk
* Handles pmc/pscav
* @param offraidData post-raid request data

View File

@ -778,6 +778,7 @@ export class InventoryController
}
/**
* Handle OpenRandomLootContainer event
* Handle event fired when a container is unpacked (currently only the halloween pumpkin)
* @param pmcData Profile data
* @param body open loot container request data

View File

@ -44,7 +44,14 @@ export class LocationController
this.airdropConfig = this.configServer.getConfig(ConfigTypes.AIRDROP);
}
/* get a location with generated loot data */
/* */
/**
* Handle client/location/getLocalloot
* Get a location (map) with generated loot data
* @param location Map to generate loot for
* @returns ILocationBase
*/
public get(location: string): ILocationBase
{
const name = location.toLowerCase().replace(" ", "");
@ -140,6 +147,7 @@ export class LocationController
}
/**
* Handle client/location/getAirdropLoot
* Get loot for an airdop container
* Generates it randomly based on config/airdrop.json values
* @returns Array of LootItem objects

View File

@ -57,6 +57,7 @@ export class MatchController
return this.matchConfig.enabled;
}
/** Handle raid/profile/list */
public getProfile(info: IGetProfileRequestData): IPmcData[]
{
if (info.profileId.includes("pmcAID"))
@ -72,16 +73,20 @@ export class MatchController
return [];
}
/** Handle client/match/group/create */
public createGroup(sessionID: string, info: ICreateGroupRequestData): any
{
return this.matchLocationService.createGroup(sessionID, info);
}
/** Handle client/match/group/delete */
public deleteGroup(info: any): void
{
this.matchLocationService.deleteGroup(info);
}
/** Handle match/group/start_game */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult
{
const output: IJoinMatchResult = {
@ -109,22 +114,24 @@ export class MatchController
return output;
}
/** Handle client/match/group/status */
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public getGroupStatus(info: IGetGroupStatusRequestData): any
{
return {
"players": [],
players: [],
maxPveCountExceeded: false
};
}
/**
* Handle /client/raid/configuration
* @param request
* @param sessionID
* @param request Raid config request
* @param sessionID Session id
*/
public startOfflineRaid(request: IGetRaidConfigurationRequestData, sessionID: string): void
{
// Store request data for access during bot generation
this.applicationContext.addValue(ContextVariableType.RAID_CONFIGURATION, request);
//TODO: add code to strip PMC of equipment now they've started the raid
@ -156,6 +163,7 @@ export class MatchController
return botDifficulty;
}
/** Handle client/match/offline/end */
public endOfflineRaid(info: IEndOfflineRaidRequestData, sessionId: string): void
{
const pmcData: IPmcData = this.profileHelper.getPmcProfile(sessionId);

View File

@ -78,6 +78,7 @@ export class NotifierController
return `${this.httpServerHelper.getBackendUrl()}/notifierServer/get/${sessionID}`;
}
/** Handle client/notifier/channel/create */
public getChannel(sessionID: string): INotifierChannel
{
return {

View File

@ -22,12 +22,13 @@ export class PresetBuildController
)
{ }
/** Handle client/handbook/builds/my/list */
public getUserBuilds(sessionID: string): WeaponBuild[]
{
return Object.values(this.saveServer.getProfile(sessionID).weaponbuilds);
}
/** Handle SaveBuild event */
public saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse
{
delete body.Action;
@ -47,7 +48,8 @@ export class PresetBuildController
output.profileChanges[sessionID].builds.push(body);
return output;
}
/** Handle RemoveBuild event*/
public removeBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse
{
const savedBuilds = this.saveServer.getProfile(sessionID).weaponbuilds;

View File

@ -34,6 +34,7 @@ export class RepairController
{ }
/**
* Handle TraderRepair event
* Repair with trader
* @param sessionID session id
* @param body endpoint request data
@ -67,6 +68,7 @@ export class RepairController
}
/**
* Handle Repair event
* Repair with repair kit
* @param sessionID session id
* @param body endpoint request data

View File

@ -45,12 +45,13 @@ class TradeController
this.traderConfig = this.configServer.getConfig(ConfigTypes.TRADER);
}
/** Handle TradingConfirm event */
public confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse
{
return this.confirmTradingInternal(pmcData, request, sessionID, this.traderConfig.purchasesAreFoundInRaid);
}
// Ragfair trading
/** Handle RagFairBuyOffer event */
public confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse
{
let output = this.eventOutputHolder.getOutput(sessionID);

View File

@ -108,6 +108,7 @@ export class TraderController
}
/**
* Handle client/trading/api/traderSettings
* Return an array of all traders
* @param sessionID Session id
* @returns array if ITraderBase objects
@ -155,11 +156,13 @@ export class TraderController
return 0;
}
/** Handle client/trading/api/getTrader */
public getTrader(sessionID: string, traderID: string): ITraderBase
{
return this.traderHelper.getTrader(sessionID, traderID);
}
/** Handle client/trading/api/getTraderAssort */
public getAssort(sessionId: string, traderId: string): ITraderAssort
{
return this.traderAssortHelper.getAssort(sessionId, traderId);

View File

@ -21,6 +21,7 @@ export class WeatherController
this.weatherConfig = this.configServer.getConfig(ConfigTypes.WEATHER);
}
/** Handle client/weather */
public generate(): IWeatherData
{
let result: IWeatherData = {

View File

@ -13,10 +13,7 @@ export class WishlistController
)
{ }
/* Adding item to wishlist
* input: playerProfileData, Request body
* output: OK (saved profile)
* */
/** Handle AddToWishList */
public addToWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse
{
for (const item in pmcData.WishList)
@ -33,10 +30,7 @@ export class WishlistController
return this.eventOutputHolder.getOutput(sessionID);
}
/* Removing item to wishlist
* input: playerProfileData, Request body
* output: OK (saved profile)
* */
/** Handle RemoveFromWishList event */
public removeFromWishList(pmcData: IPmcData, body: IWishlistActionData, sessionID: string): IItemEventRouterResponse
{
for (let i = 0; i < pmcData.WishList.length; i++)

View File

@ -125,6 +125,7 @@ export class Watermark
}
/**
* Handle singleplayer/settings/version
* Get text shown in game on screen, can't be translated as it breaks bsgs client when certian characters are used
* @returns string
*/
@ -138,19 +139,19 @@ export class Watermark
}
/** Set window title */
public setTitle(): void
protected setTitle(): void
{
process.title = this.versionLabel;
}
/** Reset console cursor to top */
public resetCursor(): void
protected resetCursor(): void
{
process.stdout.write("\u001B[2J\u001B[0;0f");
}
/** Draw the watermark */
public draw(): void
protected draw(): void
{
const result = [];