2using System.Collections.Generic;
11 public StringBuilder
ApplyTone(
string id, ref
string text,
int gender)
17 Dictionary<string, string> dictionary =
all[id];
18 StringBuilder stringBuilder =
new StringBuilder();
21 for (
int i = 0; i < text.Length; i++)
28 if (dictionary.ContainsKey(text2))
30 string text3 = dictionary[text2].Split(
new string[3] {
"\r\n",
"\r",
"\n" }, StringSplitOptions.None).TryGet((gender != 2) ? 1 : 0, 0);
31 stringBuilder.Append(text3.Split(
',').RandomItem());
35 stringBuilder.Append(text2);
43 else if (text[i] ==
'{')
50 stringBuilder.Append(text[i]);
53 stringBuilder.Replace(
"…~",
"~…");
54 stringBuilder.Replace(
"…ー",
"ー…");
68 Dictionary<string, string> dictionary =
all[id];
69 string text = dictionary[
"I"].Split(
new string[3] {
"\r\n",
"\r",
"\n" }, StringSplitOptions.None).TryGet((gender != 2) ? 1 : 0, 0);
70 string text2 = dictionary[
"YOU"].Split(
new string[3] {
"\r\n",
"\r",
"\n" }, StringSplitOptions.None).TryGet((gender != 2) ? 1 : 0, 0);
71 string[] array = text.Split(
',');
72 string[] array2 = text2.Split(
',');
73 return id +
"|" + array[rnd(rnd(array.Length) + 1)] +
"|" + array2[rnd(rnd(array2.Length) + 1)];
Dictionary< string, Dictionary< string, string > > all
virtual void Initialize()
StringBuilder ApplyTone(string id, ref string text, int gender)
override void OnInitialize()
string GetToneID(string id, int gender)