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);
|
JObject jsonObject = JObject.Parse(jsonString);
|
||||||
return new CS2GameState()
|
return new CS2GameState()
|
||||||
{
|
{
|
||||||
|
ProviderSteamId = jsonObject.SelectToken("provider.steamid")!.Value<string>()!,
|
||||||
Timestamp = jsonObject.SelectToken("provider.timestamp")!.Value<int>(),
|
Timestamp = jsonObject.SelectToken("provider.timestamp")!.Value<int>(),
|
||||||
Map = ParseMapFromJObject(jsonObject),
|
Map = ParseMapFromJObject(jsonObject),
|
||||||
Player = ParsePlayerFromJObject(jsonObject)
|
Player = ParsePlayerFromJObject(jsonObject)
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
public struct CS2GameState
|
public struct CS2GameState
|
||||||
{
|
{
|
||||||
|
public string ProviderSteamId;
|
||||||
public int Timestamp;
|
public int Timestamp;
|
||||||
public Map? Map;
|
public Map? Map;
|
||||||
public Player? Player;
|
public Player? Player;
|
||||||
@ -9,7 +10,7 @@ public struct CS2GameState
|
|||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return $"{GetType()}\n" +
|
return $"{GetType()}\n" +
|
||||||
$"\tTime: {Timestamp}\n" +
|
$"\tTime: {Timestamp}\tSteamId: {ProviderSteamId}\n" +
|
||||||
$"\t{Map}\n" +
|
$"\t{Map}\n" +
|
||||||
$"\t{Player}\n";
|
$"\t{Player}\n";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user