-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
106e3b3
commit 74bc84a
Showing
12 changed files
with
87 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
using Newtonsoft.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Artemis.Plugins.Games.CSGO.GameDataModels; | ||
|
||
public class Map | ||
{ | ||
[JsonProperty("mode")] | ||
[JsonPropertyName("mode")] | ||
public string? Mode { get; set; } | ||
|
||
[JsonProperty("name")] | ||
[JsonPropertyName("name")] | ||
public string? Name { get; set; } | ||
|
||
[JsonProperty("phase")] | ||
[JsonPropertyName("phase")] | ||
public string? Phase { get; set; } | ||
|
||
[JsonProperty("round")] | ||
[JsonPropertyName("round")] | ||
public int? Round { get; set; } | ||
|
||
[JsonProperty("team_ct")] | ||
[JsonPropertyName("team_ct")] | ||
public Team? TeamCt { get; set; } | ||
|
||
[JsonProperty("team_t")] | ||
[JsonPropertyName("team_t")] | ||
public Team? TeamT { get; set; } | ||
|
||
[JsonProperty("num_matches_to_win_series")] | ||
[JsonPropertyName("num_matches_to_win_series")] | ||
public int? NumMatchesToWinSeries { get; set; } | ||
|
||
[JsonProperty("current_spectators")] | ||
[JsonPropertyName("current_spectators")] | ||
public int? CurrentSpectators { get; set; } | ||
|
||
[JsonProperty("souvenirs_total")] | ||
[JsonPropertyName("souvenirs_total")] | ||
public int? SouvenirsTotal { get; set; } | ||
} |
12 changes: 6 additions & 6 deletions
12
src/Artemis.Plugins.Games.CSGO/GameDataModels/MatchStats.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
using Newtonsoft.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Artemis.Plugins.Games.CSGO.GameDataModels; | ||
|
||
public class MatchStats | ||
{ | ||
[JsonProperty("kills")] | ||
[JsonPropertyName("kills")] | ||
public int? Kills { get; set; } | ||
|
||
[JsonProperty("assists")] | ||
[JsonPropertyName("assists")] | ||
public int? Assists { get; set; } | ||
|
||
[JsonProperty("deaths")] | ||
[JsonPropertyName("deaths")] | ||
public int? Deaths { get; set; } | ||
|
||
[JsonProperty("mvps")] | ||
[JsonPropertyName("mvps")] | ||
public int? Mvps { get; set; } | ||
|
||
[JsonProperty("score")] | ||
[JsonPropertyName("score")] | ||
public int? Score { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
using Newtonsoft.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Artemis.Plugins.Games.CSGO.GameDataModels; | ||
|
||
public class Player | ||
{ | ||
[JsonProperty("steamid")] | ||
[JsonPropertyName("steamid")] | ||
public string? SteamId { get; set; } | ||
|
||
[JsonProperty("name")] | ||
[JsonPropertyName("name")] | ||
public string? Name { get; set; } | ||
|
||
[JsonProperty("observer_slot")] | ||
[JsonPropertyName("observer_slot")] | ||
public int? ObserverSlot { get; set; } | ||
|
||
[JsonProperty("team")] | ||
[JsonPropertyName("team")] | ||
public string? Team { get; set; } | ||
|
||
[JsonProperty("activity")] | ||
[JsonPropertyName("activity")] | ||
public string? Activity { get; set; } | ||
|
||
[JsonProperty("match_stats")] | ||
[JsonPropertyName("match_stats")] | ||
public MatchStats? MatchStats { get; set; } | ||
|
||
[JsonProperty("state")] | ||
[JsonPropertyName("state")] | ||
public State? State { get; set; } | ||
|
||
[JsonProperty("weapons")] | ||
[JsonPropertyName("weapons")] | ||
public Weapons? Weapons { get; set; } | ||
} |
17 changes: 6 additions & 11 deletions
17
src/Artemis.Plugins.Games.CSGO/GameDataModels/RootGameData.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,25 @@ | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Artemis.Plugins.Games.CSGO.GameDataModels; | ||
|
||
public class RootGameData | ||
{ | ||
[JsonProperty("round")] | ||
[JsonPropertyName("round")] | ||
public Round? Round { get; set; } | ||
|
||
[JsonProperty("map")] | ||
[JsonPropertyName("map")] | ||
public Map? Map { get; set; } | ||
|
||
[JsonProperty("player")] | ||
[JsonPropertyName("player")] | ||
public Player? Player { get; set; } | ||
|
||
[JsonProperty("previously")] | ||
[JsonPropertyName("previously")] | ||
public RootGameData? Previously { get; set; } | ||
|
||
//this one is weird, not exactly the same structure. | ||
//i think it's just a dictionary of bools. | ||
//if true, it got added? | ||
//probably not useful to us. | ||
//[JsonProperty("added")] | ||
//[JsonPropertyName("added")] | ||
//public RootGameData? Added { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
using Newtonsoft.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Artemis.Plugins.Games.CSGO.GameDataModels; | ||
|
||
public class Round | ||
{ | ||
[JsonProperty("phase")] | ||
[JsonPropertyName("phase")] | ||
public string? Phase { get; set; } | ||
|
||
[JsonProperty("win_team")] | ||
[JsonPropertyName("win_team")] | ||
public string? WinTeam { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,39 @@ | ||
using Newtonsoft.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Artemis.Plugins.Games.CSGO.GameDataModels; | ||
|
||
public class State | ||
{ | ||
[JsonProperty("health")] | ||
[JsonPropertyName("health")] | ||
public int? Health { get; set; } | ||
|
||
[JsonProperty("armor")] | ||
[JsonPropertyName("armor")] | ||
public int? Armor { get; set; } | ||
|
||
[JsonProperty("helmet")] | ||
[JsonPropertyName("helmet")] | ||
public bool? Helmet { get; set; } | ||
|
||
[JsonProperty("defusekit")] | ||
[JsonPropertyName("defusekit")] | ||
public bool? DefuseKit { get; set; } | ||
|
||
[JsonProperty("flashed")] | ||
[JsonPropertyName("flashed")] | ||
public int? Flashed { get; set; } | ||
|
||
[JsonProperty("smoked")] | ||
[JsonPropertyName("smoked")] | ||
public int? Smoked { get; set; } | ||
|
||
[JsonProperty("burning")] | ||
[JsonPropertyName("burning")] | ||
public int? Burning { get; set; } | ||
|
||
[JsonProperty("money")] | ||
[JsonPropertyName("money")] | ||
public int? Money { get; set; } | ||
|
||
[JsonProperty("round_kills")] | ||
[JsonPropertyName("round_kills")] | ||
public int? RoundKills { get; set; } | ||
|
||
[JsonProperty("round_killhs")] | ||
[JsonPropertyName("round_killhs")] | ||
public int? RoundKillHeadshot { get; set; } | ||
|
||
[JsonProperty("equip_value")] | ||
[JsonPropertyName("equip_value")] | ||
public int? EquipValue { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
using Newtonsoft.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Artemis.Plugins.Games.CSGO.GameDataModels; | ||
|
||
public class Team | ||
{ | ||
[JsonProperty("score")] | ||
[JsonPropertyName("score")] | ||
public int? Score { get; set; } | ||
|
||
[JsonProperty("consecutive_round_losses")] | ||
[JsonPropertyName("consecutive_round_losses")] | ||
public int? ConsecutiveRoundLosses { get; set; } | ||
|
||
[JsonProperty("timeouts_remaining")] | ||
[JsonPropertyName("timeouts_remaining")] | ||
public int? TimeoutsRemaining { get; set; } | ||
|
||
[JsonProperty("matches_won_this_series")] | ||
[JsonPropertyName("matches_won_this_series")] | ||
public int? MatchesWonThisSeries { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
using Newtonsoft.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Artemis.Plugins.Games.CSGO.GameDataModels; | ||
|
||
public class Weapon | ||
{ | ||
[JsonProperty("name")] | ||
[JsonPropertyName("name")] | ||
public string? Name { get; set; } | ||
|
||
[JsonProperty("paintkit")] | ||
[JsonPropertyName("paintkit")] | ||
public string? Paintkit { get; set; } | ||
|
||
[JsonProperty("type")] | ||
[JsonPropertyName("type")] | ||
public string? Type { get; set; } | ||
|
||
[JsonProperty("ammo_clip")] | ||
[JsonPropertyName("ammo_clip")] | ||
public int? AmmoClip { get; set; } | ||
|
||
[JsonProperty("ammo_clip_max")] | ||
[JsonPropertyName("ammo_clip_max")] | ||
public int? AmmoClipMax { get; set; } | ||
|
||
[JsonProperty("ammo_reserve")] | ||
[JsonPropertyName("ammo_reserve")] | ||
public int? AmmoReserve { get; set; } | ||
|
||
[JsonProperty("state")] | ||
[JsonPropertyName("state")] | ||
public string? State { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
using Newtonsoft.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Artemis.Plugins.Games.CSGO.GameDataModels; | ||
|
||
public class Weapons | ||
{ | ||
[JsonProperty("weapon_0")] | ||
[JsonPropertyName("weapon_0")] | ||
public Weapon? Weapon0 { get; set; } | ||
|
||
[JsonProperty("weapon_1")] | ||
[JsonPropertyName("weapon_1")] | ||
public Weapon? Weapon1 { get; set; } | ||
|
||
[JsonProperty("weapon_2")] | ||
[JsonPropertyName("weapon_2")] | ||
public Weapon? Weapon2 { get; set; } | ||
|
||
[JsonProperty("weapon_3")] | ||
[JsonPropertyName("weapon_3")] | ||
public Weapon? Weapon3 { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
using System.Text.Json.Serialization; | ||
using Artemis.Plugins.Games.CSGO.GameDataModels; | ||
|
||
namespace Artemis.Plugins.Games.CSGO; | ||
|
||
[JsonSerializable(typeof(RootGameData))] | ||
internal partial class JsonSourceContext : JsonSerializerContext; |