(57c46943d) Quick fix watchman graphics (not quite right yet, but better). Re-enable the variant 2.
This commit is contained in:
@@ -133,24 +133,13 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
int conversationStart = -1;
|
||||
for (int i = 0; i < csvContent.Length; i++)
|
||||
{
|
||||
if (csvContent[i].StartsWith("Generic"))
|
||||
{
|
||||
conversationStart = i + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*if (traitStart == -1)
|
||||
if (traitStart == -1)
|
||||
{
|
||||
DebugConsole.ThrowError("Invalid formatting of NPCConversations, no traits found!");
|
||||
return null;
|
||||
}*/
|
||||
}
|
||||
|
||||
//DebugConsole.NewMessage("Count: " + NPCPersonalityTrait.List.Count);
|
||||
/*for (int i = 0; i < conversationStart; i++) // Traits
|
||||
for (int i = 0; i < NPCPersonalityTrait.List.Count; i++) // Traits
|
||||
{
|
||||
//string[] split = SplitCSV(csvContent[traitStart + i].Trim(separator));
|
||||
string[] split = csvContent[traitStart + i].Split(separator);
|
||||
@@ -159,9 +148,9 @@ namespace Barotrauma
|
||||
$"{GetVariable("name", split[1])}" +
|
||||
$"{GetVariable("alloweddialogtags", string.Join(",", NPCPersonalityTrait.List[i].AllowedDialogTags))}" +
|
||||
$"{GetVariable("commonness", NPCPersonalityTrait.List[i].Commonness.ToString())}/>");
|
||||
}*/
|
||||
}
|
||||
|
||||
for (int i = conversationStart; i < csvContent.Length; i++) // Conversations
|
||||
for (int i = traitStart + NPCPersonalityTrait.List.Count; i < csvContent.Length; i++) // Conversations
|
||||
{
|
||||
//string[] presplit = csvContent[i].Split(separator); // Handling speaker index fetching, somehow doesn't work with the regex
|
||||
//string[] split = SplitCSV(csvContent[i]);
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace Barotrauma
|
||||
string currWord = "";
|
||||
for (int i = 0; i < text.Length; i++)
|
||||
{
|
||||
if (isCJK.IsMatch(text[i].ToString()))
|
||||
if (TextManager.IsCJK(text[i].ToString()))
|
||||
{
|
||||
if (currWord.Length > 0)
|
||||
{
|
||||
@@ -200,24 +200,13 @@ namespace Barotrauma
|
||||
linePos = size.X + spaceSize.X;
|
||||
}
|
||||
|
||||
if (i < words.Count - 1 && !isCJK.IsMatch(words[i]) && !isCJK.IsMatch(words[i + 1]))
|
||||
if (i < words.Count - 1 && !TextManager.IsCJK(words[i]) && !TextManager.IsCJK(words[i + 1]))
|
||||
{
|
||||
wrappedText.Append(" ");
|
||||
}
|
||||
}
|
||||
|
||||
return wrappedText.ToString().Replace(" \n ", "\n");
|
||||
}
|
||||
|
||||
static Regex isCJK = new Regex(
|
||||
@"\p{IsHangulJamo}|" +
|
||||
@"\p{IsCJKRadicalsSupplement}|" +
|
||||
@"\p{IsCJKSymbolsandPunctuation}|" +
|
||||
@"\p{IsEnclosedCJKLettersandMonths}|" +
|
||||
@"\p{IsCJKCompatibility}|" +
|
||||
@"\p{IsCJKUnifiedIdeographsExtensionA}|" +
|
||||
@"\p{IsCJKUnifiedIdeographs}|" +
|
||||
@"\p{IsHangulSyllables}|" +
|
||||
@"\p{IsCJKCompatibilityForms}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user