4.2 ApplyClientProfile 46 项声明式属性字典完整映射表
NpcFullFeatureKit.ApplyClientProfile(StoreClient sc, Dictionary<string, object> profile) 支持通过字典一次性声明式配置 StoreClient 的全部 46 项核心字段、列表、委托与对话树。以下是源码级 1:1 映射详表:
| 序号 | 字典键名 (Key) | 期望值类型 (Type) | 映射的 StoreClient 底层字段 / 调用方法 |
|---|---|---|---|
| 1 | "DisplayName" | string | sc.displayName = val |
| 2 | "SpriteName" | string | sc.spriteName = NpcTraitHelper.ResolveValidSpriteName(val) |
| 3 | "PossibleSprites" | IEnumerable<string> | 遍历加入 sc.possibleSprites |
| 4 | "Faction" | string | sc.clientFaction = val |
| 5 | "BubbleColor" | string | sc.bubbleColor = val(如 "dark") |
| 6 | "ClientIntent" | int | sc.clientIntent = (StoreClient.ClientIntent)val |
| 7 | "Budget" | int | sc.SetBudget(val) |
| 8 | "UseClientBudget" | bool | sc.useClientBudget = val |
| 9 | "BuyPriceModifier" | int | sc.buyPriceModifier = val |
| 10 | "SellPriceModifier" | int | sc.sellPriceModifier = val |
| 11 | "IsOfferWholesale" | bool | sc.isOfferWholesale = val |
| 12 | "WholesaleDiscount" | int | sc.wholesaleDiscount = val |
| 13 | "RequireVariety" | bool | 若为 true 则调用 sc.SetVariety() |
| 14 | "NoAcceptingContraband" | bool | sc.noAcceptingContraband = val |
| 15 | "AcceptingContrabandOverride" | bool | sc.AcceptingContrabandOverride = val |
| 16 | "ChargesContrabandMarkup" | bool | sc.chargesContrabandMarkup = val |
| 17 | "AcceptRetailMarkup" | bool | sc.acceptRetailMarkup = val |
| 18 | "RefusesHazardousWaterLabel" | bool | sc.refusesHazardousWaterLabel = val |
| 19 | "PerfumeInfluence" | int | sc.perfumeInfluence = val |
| 20 | "ClientImpatience" | int | sc.clientImpatience = val |
| 21 | "AlwaysRejectBadBargain" | bool | sc.alwaysRejectBadBargain = val |
| 22 | "IsBargainAvailable" | bool | sc.isBargainAvailable = val |
| 23 | "StaysAfterFailedBargain" | bool | sc.staysAfterFailedBargain = val |
| 24 | "Dismissable" | bool | sc.dismissable = val |
| 25 | "Arrestable" | bool | sc.arrestable = val |
| 26 | "NonShootable" | bool | sc.nonShootable = val |
| 27 | "IsSecurity" | bool | sc.isSecurity = val |
| 28 | "IsLazyInspector" | bool | sc.isLazyInspector = val |
| 29 | "IsNoContributeToEvidence" | bool | sc.isNoContributeToEvidence = val |
| 30 | "IsAug" | bool | sc.isAug = val(注意:仅敌对伪装怪物设 true) |
| 31 | "AugTier" | int | sc.augTier = val |
| 32 | "AugIdleTell" | int | sc.augIdleTell = (StoreClient.AugIdleTell)val |
| 33 | "MakeDisguisedAugTier" | int | 调用 AugHelper.MakeDisguisedAug(sc, val) |
| 34 | "CanExposeChem" | bool | sc.CanExposeChem = val |
| 35 | "AcceptedChemicalGrade" | int | sc.acceptedChemicalProductGrade = val |
| 36 | "ExposePreset" | int | 调用 NpcTraitHelper.ApplyExposePreset(...) |
| 37 | "CanReturn" / "CanReturnAsBuyer" | bool | sc.CanReturn = val / sc.CanReturnAsBuyer = val |
| 38 | "AlwaysFeedback" | bool | sc.alwaysFeedback = val |
| 39 | "IsClientAddict" | bool | sc.IsClientAddict = val |
| 40 | "TradeReputationMultiplier" | double | sc.tradeReputationMultiplier = val |
| 41 | "BuyingTags" / "BuyingIds" | IEnumerable<string> | 加入 clientBuyingTagList / clientBuyingIdList |
| 42 | "BlackTags" / "BlackIds" | IEnumerable<string> | 加入 clientBlackTagList / clientBlackIdList |
| 43 | "InspectionChecks" | IEnumerable<string> | 遍历调用 sc.AddCheck(c) |
| 44 | "OnArrival" / "OnDismiss" / "OnDealAccepted" | Action | 绑定进离店与成交回调 |
| 45 | "OnItemAddedToWeighted" / "OnItemSold" / "OnItemBought" | Action<...> | 绑定天平与买卖实时回调 |
| 46 | "InterrogationDialogue" / "GlassesDialogue" / "CustomOnArrestDialogue" / "RepeatDialogue" | Dialogue | 绑定盘问、目镜、逮捕与重复催促对话 |