/// <summary> /// Removes a monologue /// </summary> public bool RemoveMonologue(Monologue monologue) { var key = LoadedMonologues.GetKeyForValue(monologue); if (!string.IsNullOrEmpty(key)) { return(LoadedMonologues.Remove(key)); } return(false); }
/// <summary> /// Adds a monologue, optionally overwriting /// </summary> public void AddMonologue(string name, Monologue monologue, bool overwrite = true) { if (overwrite || !LoadedMonologues.ContainsKey(name)) { LoadedMonologues[name] = monologue; } else { throw new InvalidOperationException("A monologue by that name already exists"); } }
static void TestMonologue(string monologue) { Monologue m = DialogueModule.GetMonologue(monologue); ConsoleModule.WriteLine(m.GetLineRandom()); }