public static string GetDialogue(string npc, string area, string scene, int id = -1) { if (!_sceneTree.ContainsKey(npc)) { return($"Missing npc {npc}"); } DialogueNPC dn = _sceneTree[npc]; DialogueArea a = dn.GetArea(area); if (a == null) { return($"Missing area {area}"); } DialogueScene s = a.GetScene(scene); if (s == null) { return($"Missing scene {scene}"); } return(ReplaceKeys(s.GetDialogue(id))); }
public static string GetDialogue(string npc, string area, string scene, int id = -1) { DialogueScene s = GetScene(npc, area, scene); if (s == null) { return("No text available."); } GlobalState.DialogueTop = s.AlignTop; return(ReplaceKeys(s.GetDialogue(id))); }