Event scrape seems to work!
This commit is contained in:
parent
3184888152
commit
d881946f67
|
@ -195,9 +195,13 @@ namespace Vocalization.Framework
|
|||
string[] files = Directory.GetFiles(dir);
|
||||
foreach(var file in files)
|
||||
{
|
||||
string eventFileName = Path.GetFileNameWithoutExtension(file)+".xnb";
|
||||
if (eventFileNames.Contains(eventFileName)) continue;
|
||||
else eventFileNames.Add(eventFileName);
|
||||
string eventFileName = Path.GetFileNameWithoutExtension(file);
|
||||
|
||||
string actualName = eventFileName.Split('.').ElementAt(0)+".xnb";
|
||||
|
||||
//Gte first position of . and split it. The 0 element will be teh actual filename.
|
||||
if (eventFileNames.Contains(actualName)) continue;
|
||||
else eventFileNames.Add(actualName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1743,15 +1743,15 @@ namespace Vocalization
|
|||
foreach (KeyValuePair<string, string> pair in DialogueDict)
|
||||
{
|
||||
string key = pair.Key;
|
||||
if (key != cue.name) continue;
|
||||
string rawDialogue = pair.Value;
|
||||
|
||||
List<string> speakingLines = getEventSpeakerLines(rawDialogue, cue.name);
|
||||
//Sanitize Event info here!
|
||||
|
||||
|
||||
foreach (var line in speakingLines)
|
||||
{
|
||||
List<string> cleanDialogues = new List<string>();
|
||||
cleanDialogues = sanitizeDialogueFromDictionaries(rawDialogue, cue);
|
||||
cleanDialogues = sanitizeDialogueFromDictionaries(line, cue);
|
||||
foreach (var str in cleanDialogues)
|
||||
{
|
||||
cue.addDialogue(str, new VoiceAudioOptions()); //Make a new dialogue line based off of the text, but have the .wav value as empty.
|
||||
|
@ -1759,6 +1759,7 @@ namespace Vocalization
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -1987,10 +1988,12 @@ namespace Vocalization
|
|||
List<string> speakingData = new List<string>();
|
||||
foreach(var dia in dialogueSplit)
|
||||
{
|
||||
if (!dia.Contains("speak") && !dia.Contains("textAboveHead") && !dia.Contains(speakerName)) continue;
|
||||
//ModMonitor.Log(dia);
|
||||
if (!dia.Contains("speak") && !dia.Contains("textAboveHead")) continue;
|
||||
string[] actualDialogue = dia.Split(new string[] { "\"" }, StringSplitOptions.None);
|
||||
|
||||
ModMonitor.Log(actualDialogue[1]);
|
||||
//Check to make sure this is the speaker's line.
|
||||
if (!actualDialogue[0].Contains(speakerName)) continue;
|
||||
//ModMonitor.Log(actualDialogue[1],LogLevel.Alert);
|
||||
//Get the actual dialogue line from this npc.
|
||||
speakingData.Add(actualDialogue[1]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue