Stubbed out item pinning

This commit is contained in:
Dev 2024-10-31 21:38:56 +00:00
parent 704aae0546
commit 17215ba9d8
5 changed files with 37 additions and 0 deletions

View File

@ -18,6 +18,7 @@ import { IInventoryTagRequestData } from "@spt/models/eft/inventory/IInventoryTa
import { IInventoryToggleRequestData } from "@spt/models/eft/inventory/IInventoryToggleRequestData";
import { IInventoryTransferRequestData } from "@spt/models/eft/inventory/IInventoryTransferRequestData";
import { IOpenRandomLootContainerRequestData } from "@spt/models/eft/inventory/IOpenRandomLootContainerRequestData";
import { IPinItemRequest } from "@spt/models/eft/inventory/IPinItemRequest";
import { IRedeemProfileRequestData } from "@spt/models/eft/inventory/IRedeemProfileRequestData";
import { ISetFavoriteItems } from "@spt/models/eft/inventory/ISetFavoriteItems";
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
@ -236,4 +237,13 @@ export class InventoryCallbacks {
): IItemEventRouterResponse {
return this.questController.failQuest(pmcData, request, sessionID, output);
}
public pin(
pmcData: IPmcData,
request: IPinItemRequest,
sessionID: string,
output: IItemEventRouterResponse,
): IItemEventRouterResponse {
return this.questController.pin(pmcData, request, sessionID, output);
}
}

View File

@ -8,6 +8,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
import { IItem } from "@spt/models/eft/common/tables/IItem";
import { IQuest, IQuestCondition } from "@spt/models/eft/common/tables/IQuest";
import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt/models/eft/common/tables/IRepeatableQuests";
import { IPinItemRequest } from "@spt/models/eft/inventory/IPinItemRequest";
import { IItemEventRouterResponse } from "@spt/models/eft/itemEvent/IItemEventRouterResponse";
import { IAcceptQuestRequestData } from "@spt/models/eft/quests/IAcceptQuestRequestData";
import { ICompleteQuestRequestData } from "@spt/models/eft/quests/ICompleteQuestRequestData";
@ -522,4 +523,20 @@ export class QuestController {
return output;
}
/**
* Handle /client/game/profile/items/moving - PinLock
* @param pmcData
* @param request
* @param sessionID
* @param output
*/
public pin(
pmcData: IPmcData,
request: IPinItemRequest,
sessionID: string,
output: IItemEventRouterResponse,
): IItemEventRouterResponse {
throw new Error("Method not implemented.");
}
}

View File

@ -0,0 +1,7 @@
export interface IPinItemRequest {
Action: "PinLock";
/** Id of item being pinned */
Item: string;
/** "Pinned"/"" */
State: string;
}

View File

@ -26,4 +26,5 @@ export enum ItemEventActions {
REDEEM_PROFILE_REWARD = "RedeemProfileReward",
SET_FAVORITE_ITEMS = "SetFavoriteItems",
QUEST_FAIL = "QuestFail",
PIN = "PinLock",
}

View File

@ -94,6 +94,8 @@ export class InventoryItemEventRouter extends ItemEventRouterDefinition {
return this.inventoryCallbacks.setFavoriteItem(pmcData, body, sessionID, output);
case ItemEventActions.QUEST_FAIL:
return this.inventoryCallbacks.failQuest(pmcData, body, sessionID, output);
case ItemEventActions.PIN:
return this.inventoryCallbacks.pin(pmcData, body, sessionID, output);
default:
throw new Error(`Unhandled event ${url} request: ${JSON.stringify(body)}`);
}