diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5c156b4..391c60c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,6 +10,11 @@ updates: # 3.x (the last license-key-free line); still allow 3.1.x patch/minor bumps. - dependency-name: "SixLabors.ImageSharp" update-types: ["version-update:semver-major"] + # Microsoft.Extensions.* majors track the target framework: the Site gets them + # from the ASP.NET Core shared framework and the plugin from the CounterStrikeSharp + # host. A lone major bump replaces those copies and breaks the build (#82). + - dependency-name: "Microsoft.Extensions.*" + update-types: ["version-update:semver-major"] groups: ktsu: patterns: diff --git a/CounterStrikeProgression.Core/CounterStrikeProgression.Core.csproj b/CounterStrikeProgression.Core/CounterStrikeProgression.Core.csproj index 8f6f7cd..08448d5 100644 --- a/CounterStrikeProgression.Core/CounterStrikeProgression.Core.csproj +++ b/CounterStrikeProgression.Core/CounterStrikeProgression.Core.csproj @@ -15,7 +15,6 @@ - diff --git a/CounterStrikeProgression/GameState.cs b/CounterStrikeProgression/GameState.cs index c1c0adc..1372ef4 100644 --- a/CounterStrikeProgression/GameState.cs +++ b/CounterStrikeProgression/GameState.cs @@ -18,7 +18,7 @@ internal static class GameState { // Finding the game rules walks every entity, so it's done once per map rather than on every shot. private static CCSGameRulesProxy? gameRules; - private static ConVar? teammatesAreEnemies; + private static ConVar? teammatesAreEnemies; /// /// Gets a value indicating whether the match is in warmup, when nothing counts. @@ -43,8 +43,8 @@ public static bool TeammatesAreEnemies { get { - teammatesAreEnemies ??= ConVar.Find("mp_teammates_are_enemies"); - return teammatesAreEnemies?.GetPrimitiveValue() ?? false; + teammatesAreEnemies ??= ConVar.Find("mp_teammates_are_enemies"); + return teammatesAreEnemies?.Value ?? false; } } diff --git a/CounterStrikeProgression/Site/SiteReporter.cs b/CounterStrikeProgression/Site/SiteReporter.cs index 06cc7da..306dc32 100644 --- a/CounterStrikeProgression/Site/SiteReporter.cs +++ b/CounterStrikeProgression/Site/SiteReporter.cs @@ -36,8 +36,8 @@ internal sealed class SiteReporter : IDisposable private readonly List pendingCorrected = []; private readonly List pendingKills = []; private DateTime? mapStartedAt; - private ConVar? gameType; - private ConVar? gameMode; + private ConVar? gameType; + private ConVar? gameMode; private int batchesSinceReset; /// @@ -196,9 +196,9 @@ public void Corrected(ulong steamId) private void CollectBatch() { - gameType ??= ConVar.Find("game_type"); - gameMode ??= ConVar.Find("game_mode"); - string mode = GameModes.Name(gameType?.GetPrimitiveValue() ?? 0, gameMode?.GetPrimitiveValue() ?? 0); + gameType ??= ConVar.Find("game_type"); + gameMode ??= ConVar.Find("game_mode"); + string mode = GameModes.Name(gameType?.Value ?? 0, gameMode?.Value ?? 0); ServerSnapshot snapshot = new(DateTime.UtcNow, Server.MapName ?? string.Empty, mode, Server.MaxPlayers, ReadPlayers(), mapStartedAt); int fullResendEvery = pluginConfig.Site.FullResendEvery; diff --git a/Directory.Packages.props b/Directory.Packages.props index 738c33d..1268216 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -7,7 +7,7 @@ - +