2using System.Collections.Generic;
3using System.Globalization;
6using AeLa.EasyFeedback;
7using AeLa.EasyFeedback.FormElements;
8using AeLa.EasyFeedback.FormFields;
70 TextField.onAddEmail = delegate
83 Append(
"OS: " + SystemInfo.operatingSystem);
84 Append(
"Processor: " + SystemInfo.processorType);
85 Append(
"Memory: " + SystemInfo.systemMemorySize);
86 Append(
"Graphics API: " + SystemInfo.graphicsDeviceType);
87 Append(
"Graphics Processor: " + SystemInfo.graphicsDeviceName);
88 Append(
"Graphics Memory: " + SystemInfo.graphicsMemorySize);
89 Append(
"Graphics Vendor: " + SystemInfo.graphicsDeviceVendor);
90 Append(
"Quality Level: " + QualitySettings.names[QualitySettings.GetQualityLevel()]);
91 Append(
"Resolution: " + Screen.width +
"x" + Screen.height);
92 Append(
"Full Screen: " + Screen.fullScreen);
93 Append(
"regionName: " + RegionInfo.CurrentRegion.Name);
94 Append(
"cultureName: " + CultureInfo.CurrentCulture.Name);
95 Append(
"cname: " + Thread.CurrentThread.CurrentCulture.Name);
96 Append(
"uiname: " + Thread.CurrentThread.CurrentUICulture.Name);
97 Append(
"device identifier: " + SystemInfo.deviceUniqueIdentifier);
98 return Environment.NewLine + Environment.NewLine + s2;
99 void Append(
string text)
103 s2 = s2 + text + Environment.NewLine;
114 Application.OpenURL(
"https://discord.gg/elona");
117 buttonSubmit.interactable =
false;
133 collector.onSubmit = delegate
137 category.Init((
string s) => (
"form_" + s).lang());
139 if (gameList.Count > 0)
143 for (
int i = 0; i < gameList.Count; i++)
160 toggleSave.onValueChanged.AddListener(delegate(
bool a)
164 toggleSave.isOn =
false;
180 bool interactable =
true;
183 interactable =
false;
187 interactable =
false;
189 buttonSubmit.interactable = interactable;
194 ReportTitle.ignore =
false;
195 ReportTitle.strAdd =
"";
196 TextField.strAddText =
"";
197 string text = Application.persistentDataPath +
"/";
198 string text2 = text +
"_temp";
199 string text3 = text2 +
"/log.zip";
200 IO.CreateDirectory(text2);
201 IO.Copy(text +
"Player.log", text2);
202 IO.Copy(text +
"Player-prev.log", text2);
205 ParseLog(text2 +
"/Player.log");
206 ParseLog(text2 +
"/Player-prev.log");
207 ReportTitle.strAdd = ((errors == 0) ?
"" : (
"(" + errors +
")"));
210 ReportTitle.strAdd +=
"(debug)";
214 string[] array =
new string[23]
216 "シーラカンス",
"ナーフ",
"つまらない",
"面白くない",
"不合理",
"やめて",
"無駄",
"弱体化",
"不親切",
"クソ",
217 "糞",
"バカ",
"馬鹿",
"coelacanth",
"nerf",
"boring",
"please don't",
"waste",
"fuck",
"suck",
218 "tbh",
"shit",
"stupid"
220 foreach (
string c2
in array)
222 num += CountString(text4, c2);
224 ReportTitle.strAdd =
header + ReportTitle.strAdd;
227 ReportTitle.strAdd = ReportTitle.strAdd +
"[ignore:" + num +
"]";
229 ReportTitle.ignore =
true;
231 using (ZipFile zipFile =
new ZipFile())
233 zipFile.ExtractExistingFile = ExtractExistingFileAction.OverwriteSilently;
234 zipFile.AddDirectory(text2);
237 form.CurrentReport.AttachFile(
"log.zip", File.ReadAllBytes(text3));
240 bool flag = ELayer.core.config.cloud || (ELayer.core.IsGameStarted &&
ELayer.
game.
isCloud);
241 string text5 = text2 +
"/save.zip";
242 using (ZipFile zipFile2 =
new ZipFile())
244 zipFile2.ExtractExistingFile = ExtractExistingFileAction.OverwriteSilently;
246 zipFile2.Save(text5);
248 form.CurrentReport.AttachFile(
saveIndex.
id +
".zip", File.ReadAllBytes(text5));
250 IO.DeleteDirectory(text2);
251 static int CountString(
string s,
string c)
253 string newValue = c.Substring(0, c.Length - 1);
254 return s.Length - s.Replace(c, newValue).Length;
256 void ParseLog(
string path)
258 if (File.Exists(path))
260 string[] array2 = IO.LoadTextArray(path);
261 foreach (
string text6
in array2)
265 case "InvalidOperationException: Collection was modified; enumeration operation may not execute.":
266 case "NullReferenceException: Object reference not set to an instance of an object":
270 if (text6.Contains(
"exception"))
274 else if (text6.Contains(
"Exception"))
279 case "InvalidOperationException: Steamworks is not initialized.":
307 Dialog.
YesNo(
"warn_mod".lang(num.ToString() ??
""), delegate
312 },
"warn_mod_yes",
"warn_mod_no");
328 ELayer.config.nameReport =
inputName.text;
333 form.transform.SetParent(
ELayer.
ui.transform, worldPositionStays:
false);
341 Append(
"OS: " + SystemInfo.operatingSystem);
342 Append(
"Processor: " + SystemInfo.processorType);
343 Append(
"Memory: " + SystemInfo.systemMemorySize);
344 Append(
"Graphics API: " + SystemInfo.graphicsDeviceType);
345 Append(
"Graphics Processor: " + SystemInfo.graphicsDeviceName);
346 Append(
"Graphics Memory: " + SystemInfo.graphicsMemorySize);
347 Append(
"Graphics Vendor: " + SystemInfo.graphicsDeviceVendor);
348 Append(
"Quality Level: " + QualitySettings.names[QualitySettings.GetQualityLevel()]);
349 Append(
"Resolution: " + Screen.width +
"x" + Screen.height);
350 Append(
"Full Screen: " + Screen.fullScreen);
352 void Append(
string s)
354 txt = txt + s + Environment.NewLine;
List< BaseModPackage > packages
static string RootSaveCloud
static Dialog YesNo(string langDetail, Action actionYes, Action actionNo=null, string langYes="yes", string langNo="no")
static List< GameIndex > GetGameList(string path, bool sortByName=false, bool includeEmptyFolder=false)
static string lastSummary
CategoryDropdown category
UIButton buttonLinkDiscord
DebugLogCollector collector
static void Toggle(string idFile, string idTopic=null)