Skip to content

Commit 7e6dd2e

Browse files
author
CSDotNET0211
committed
added new v18 support,
.ttc parser
1 parent 2fbaed0 commit 7e6dd2e

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

ConsoleApp/Program.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
START: ;
99
string jsonString = string.Empty;
1010
//string fileName = Console.ReadLine();
11-
string fileName = @"C:\Users\CSDotNET\Downloads\rMS7ralU5.ttrm";
12-
fileName = fileName.Replace("\"", "");
11+
string fileName = @"C:\Users\CSDotNET\Downloads\config.ttc";
12+
fileName = fileName.Replace("\"",
13+
var json=JsonSerializer.Deserialize<ConfigDataTTC>(File.ReadAllText(fileName));
14+
"");
15+
1316
using (StreamReader reader = new StreamReader(fileName, Encoding.UTF8))
1417
{
1518
jsonString = reader.ReadToEnd();
Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
namespace TetrLoader.JsonClass
22
{
33

4-
public class ConfigData
4+
public class ConfigDataTTC
55
{
6-
6+
public Controls? controls { get; set; }
7+
public Handling? handling { get; set; }
8+
public Volume? volume { get; set; }
9+
public Video? video { get; set; }
10+
public Gameoptions? gameoptions { get; set; }
11+
public Electron? electron { get; set; }
12+
public Notifications? notifications { get; set; }
713
}
814

915
// Root myDeserializedClass = JsonConvert.DeserializeObject<Root>(myJsonResponse);
@@ -81,16 +87,6 @@ public class Notifications
8187
public string? other { get; set; }
8288
}
8389

84-
public class Root
85-
{
86-
public Controls? controls { get; set; }
87-
public Handling? handling { get; set; }
88-
public Volume? volume { get; set; }
89-
public Video? video { get; set; }
90-
public Gameoptions? gameoptions { get; set; }
91-
public Electron? electron { get; set; }
92-
public Notifications? notifications { get; set; }
93-
}
9490

9591
public class Video
9692
{

TetrLoader/JsonClass/Event/EventFullOptions.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,9 @@ public class EventFullOptionsData
7676
public bool? masterlevels { get; set; }
7777
public string? gameid { get; set; }
7878
public bool? gravitymay20g { get; set; }
79+
public double? messiness_change { get; set; }
80+
public double? messiness_inner { get; set; }
81+
public bool? messiness_nosame { get; set; }
82+
public int? messiness_timeout { get; set; }
7983
}
8084
}

0 commit comments

Comments
 (0)