0.2.0: Server-Browser und Spiel-Ticket
- Seite Server: Liste der Website, Ping/Spieler direkt abgefragt, BEITRETEN und Direkt verbinden - Holt beim Spielen ein Spiel-Ticket und schreibt es in BSO.json Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+3
-2
@@ -85,8 +85,8 @@ public static class Game
|
||||
LauncherLog.Info("BSO installiert nach " + bin);
|
||||
}
|
||||
|
||||
/// <summary>Einstellungen der Mod (BSO\BSO.json) - Name = Kontoname, Server, automatisch verbinden.</summary>
|
||||
public static void WriteModConfig(string folder, string? name, string server, bool autoConnect)
|
||||
/// <summary>Einstellungen der Mod (BSO\BSO.json) - Name = Kontoname, Server, automatisch verbinden, Spiel-Ticket.</summary>
|
||||
public static void WriteModConfig(string folder, string? name, string server, bool autoConnect, string? ticket)
|
||||
{
|
||||
string file = Path.Combine(Bin(folder), "BSO", "BSO.json");
|
||||
JsonObject json;
|
||||
@@ -95,6 +95,7 @@ public static class Game
|
||||
if (!string.IsNullOrEmpty(name)) json["Name"] = name;
|
||||
json["Server"] = server;
|
||||
json["AutoConnect"] = autoConnect;
|
||||
json["Ticket"] = ticket;
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(file)!);
|
||||
File.WriteAllText(file, json.ToJsonString(new JsonSerializerOptions { WriteIndented = true }));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user