10. Multi-Day Procurement Contracts (AttachProcurementOffer)
Procurement contracts (ClientIntent.PROCUREMENT_OFFER and PROCUREMENT_COLLECT) allow a customer to commission a specific item across multiple days. On the initial visit, the client pays initialAdvanceCash upfront and leaves a physical procurement_slip on the counter; after dueInDays days, the game automatically queues the client's return visit to collect the item and pay finalRewardCash.
SDK Signature
csharp
public static void AttachProcurementOffer(
StoreClient client,
string clientName,
string offerDescription,
string collectDescription,
int dueInDays,
int initialAdvanceCash,
int finalRewardCash,
Func<GameItem, bool> itemValidator)Code Example: 3-Day Augmentation Chip Commission
csharp
private static StoreClient CreateChipProcurementClient()
{
var sc = new StoreClient
{
identifier = "cyber_surgeon_procure",
displayName = NpcFrameworkSdk.T("高阶义体外科主任", "Senior Cyber-Surgeon"),
spriteName = SpriteDict.GetRandomMedSpriteName(),
clientFaction = "FACTION_UPPER_LEVEL"
};
NpcFrameworkSdk.AttachProcurementOffer(
client: sc,
clientName: sc.displayName,
offerDescription: NpcFrameworkSdk.T("3 天后我有一台手术,急需一枚义体芯片。先付 100 定金,取货时再付 450 尾款。", "I need an Augmentation Chip in 3 days. Here is 100 credits upfront and 450 upon collection."),
collectDescription: NpcFrameworkSdk.T("我来取预订的义体芯片了。", "I'm here to collect the Augmentation Chip we agreed on."),
dueInDays: 3,
initialAdvanceCash: 100,
finalRewardCash: 450,
itemValidator: item => item != null && item.itemID == "aug_chip"
);
sc.CompleteClientCreation(false);
return sc;
}