Add own Steamid

This commit is contained in:
glax 2024-01-15 20:49:09 +01:00
parent ab0e851996
commit 534ca30378
2 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,7 @@ internal static class CS2GSIJsonParser
JObject jsonObject = JObject.Parse(jsonString);
return new CS2GameState()
{
ProviderSteamId = jsonObject.SelectToken("provider.steamid")!.Value<string>()!,
Timestamp = jsonObject.SelectToken("provider.timestamp")!.Value<int>(),
Map = ParseMapFromJObject(jsonObject),
Player = ParsePlayerFromJObject(jsonObject)

View File

@ -2,6 +2,7 @@
public struct CS2GameState
{
public string ProviderSteamId;
public int Timestamp;
public Map? Map;
public Player? Player;
@ -9,7 +10,7 @@ public struct CS2GameState
public override string ToString()
{
return $"{GetType()}\n" +
$"\tTime: {Timestamp}\n" +
$"\tTime: {Timestamp}\tSteamId: {ProviderSteamId}\n" +
$"\t{Map}\n" +
$"\t{Player}\n";
}