2using System.Collections.Generic;
11 public StringBuilder
ApplyTone(
string id, ref
string text,
int gender)
14 Dictionary<string, string> dictionary =
all[id];
15 StringBuilder stringBuilder =
new StringBuilder();
18 for (
int i = 0; i < text.Length; i++)
25 if (dictionary.ContainsKey(text2))
27 string text3 = dictionary[text2].Split(
new string[3] {
"\r\n",
"\r",
"\n" }, StringSplitOptions.None).TryGet((gender != 2) ? 1 : 0, 0);
28 stringBuilder.Append(text3.Split(
',').RandomItem());
32 stringBuilder.Append(text2);
40 else if (text[i] ==
'{')
47 stringBuilder.Append(text[i]);
50 stringBuilder.Replace(
"…~",
"~…");
51 stringBuilder.Replace(
"…ー",
"ー…");
62 Dictionary<string, string> dictionary =
all[id];
63 string text = dictionary[
"I"].Split(
new string[3] {
"\r\n",
"\r",
"\n" }, StringSplitOptions.None).TryGet((gender != 2) ? 1 : 0, 0);
64 string text2 = dictionary[
"YOU"].Split(
new string[3] {
"\r\n",
"\r",
"\n" }, StringSplitOptions.None).TryGet((gender != 2) ? 1 : 0, 0);
65 string[] array = text.Split(
',');
66 string[] array2 = text2.Split(
',');
67 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)