public static void CallNPC(NPC npc) { if (npc.isSleeping) { Monitor.Log($"{npc.Name} is sleeping"); Game1.activeClickableMenu = new DialogueBox(Helper.Translation.Get("no-answer")); return; } MobilePhoneCall.inCallReminiscence = null; ModEntry.isReminiscing = false; ModEntry.isReminiscingAtNight = false; ModEntry.isInviting = false; ModEntry.inCall = true; ModEntry.callingNPC = npc; MobilePhoneCall.ShowMainCallDialogue(npc); return; }
private static async void robinPhoneConstructionMessage(IClickableMenu instance, BluePrint CurrentBlueprint) { Game1.player.forceCanMove(); string dialoguePath = "Data\\ExtraDialogue:Robin_" + (Helper.Reflection.GetField <bool>(instance, "upgrading").GetValue() ? "Upgrade" : "New") + "Construction"; if (Utility.isFestivalDay(Game1.dayOfMonth + 1, Game1.currentSeason)) { dialoguePath += "_Festival"; } if (CurrentBlueprint.daysToConstruct <= 0) { Game1.drawDialogue(Game1.getCharacterFromName("Robin", true), Game1.content.LoadString("Data\\ExtraDialogue:Robin_Instant", (LocalizedContentManager.CurrentLanguageCode == LocalizedContentManager.LanguageCode.de) ? CurrentBlueprint.displayName : CurrentBlueprint.displayName.ToLower())); } else { Game1.drawDialogue(Game1.getCharacterFromName("Robin", true), Game1.content.LoadString(dialoguePath, (LocalizedContentManager.CurrentLanguageCode == LocalizedContentManager.LanguageCode.de) ? CurrentBlueprint.displayName : CurrentBlueprint.displayName.ToLower(), (LocalizedContentManager.CurrentLanguageCode == LocalizedContentManager.LanguageCode.de) ? CurrentBlueprint.displayName.Split(' ').Last().Split('-').Last() : ((LocalizedContentManager.CurrentLanguageCode == LocalizedContentManager.LanguageCode.pt || LocalizedContentManager.CurrentLanguageCode == LocalizedContentManager.LanguageCode.es || LocalizedContentManager.CurrentLanguageCode == LocalizedContentManager.LanguageCode.it) ? CurrentBlueprint.displayName.ToLower().Split(' ').First() : CurrentBlueprint.displayName.ToLower().Split(' ').Last()))); } while (Game1.activeClickableMenu is DialogueBox) { await Task.Delay(50); } MobilePhoneCall.ShowMainCallDialogue(ModEntry.callingNPC); }
private void OnExit() { MobilePhoneCall.ShowMainCallDialogue(ModEntry.callingNPC); }