14. Holophone Contacts & Dial-to-Summon (RegisterPhoneContact)
The holophone on the right side of the counter allows players to dial 7-digit numbers and interact with custom phone dialogue trees. NpcPhoneRegistry automates binding PhoneClientList.DialogFuncs and syncing unlocked entries into PlayerStore.Instance.PhoneClientDict.
SDK Signature
csharp
public static void RegisterPhoneContact(
long number,
string dialogFuncId,
Func<string> displayNameGetter,
int cooldownDays,
Func<bool> isUnlockedPredicate,
Func<StorePhoneClient, Dialogue> callDialogFactory,
params string[] clientAliases)Passing all stage IDs of the character in
clientAliasesprevents immersion-breaking calls when that NPC is already standing at your counter.
Code Example: Dialing 2077077 to Summon V
csharp
NpcFrameworkSdk.RegisterPhoneContact(
number: 2077077L,
dialogFuncId: "CyberpunkMercV_Call",
displayNameGetter: () => NpcFrameworkSdk.T("传奇佣兵 V (2077077)", "V - Afterlife Merc (2077077)"),
cooldownDays: 3,
isUnlockedPredicate: () => NpcFrameworkSdk.GetSaveInt("v_stage", 0) == 4,
callDialogFactory: CreateVPhoneDialogue,
clientAliases: new[] { "v", "v_act1_relic", "v_act2_gun_order", "v_act3_heist", "v_recurring_merc" }
);