public static List <string> BuildScript(Emote emote, int depth) { //Console.WriteLine($"{emote}"); var scriptLines = new List <string>(); var indent = string.Concat(Enumerable.Repeat(" ", depth)); scriptLines.Add($"{indent}- {emote.ToString(true)}"); if (emote.Branches != null) { scriptLines.AddRange(BuildScript(emote.Branches, depth + 1)); } return(scriptLines); }
/// <summary> /// Returns a list of EmoteSets /// that this Emote can possibly branch to /// </summary> public List <EmoteSet> GetLinks(Emote emote) { var links = new List <EmoteSet>(); foreach (var emoteSet in EmoteSets) { if (!emote.ValidBranches.Contains(emoteSet.Category)) { continue; } if (!emoteSet.Quest.Equals(emote.Message)) { continue; } links.Add(emoteSet); } return(links); }
public Emote_Line(EmoteType type, Dictionary <string, string> dict, float?delay = null) { Emote = BuildEmote(type, dict, delay); }
public void Add(Emote emote) { Emotes.Add(emote); }