Add own Steamid
This commit is contained in:
parent
ab0e851996
commit
534ca30378
@ -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)
|
||||
|
@ -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";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user