From bc2f3853849982f549c13deec2e05343dd821e7e Mon Sep 17 00:00:00 2001 From: W0lf4llo <96880844+W0lf4llo@users.noreply.github.com> Date: Mon, 21 Nov 2022 00:28:38 -0500 Subject: [PATCH] Total level count shows compatible levels instead of levels uploaded all throughout lighthouse. (#563) * StatisticsController test & Renammed hearted cat * Total Level Counts show all compatible levels. * Formatted document * Update ProjectLighthouse.Servers.GameServer/Controllers/StatisticsController.cs Change 1 Co-authored-by: Josh * Update ProjectLighthouse.Servers.GameServer/Controllers/StatisticsController.cs Change 2 Co-authored-by: Josh * Fix compilation error Co-authored-by: Josh --- .../Controllers/StatisticsController.cs | 8 +++++--- ProjectLighthouse/Levels/Categories/HeartedCategory.cs | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ProjectLighthouse.Servers.GameServer/Controllers/StatisticsController.cs b/ProjectLighthouse.Servers.GameServer/Controllers/StatisticsController.cs index 755214b1..0999b344 100644 --- a/ProjectLighthouse.Servers.GameServer/Controllers/StatisticsController.cs +++ b/ProjectLighthouse.Servers.GameServer/Controllers/StatisticsController.cs @@ -2,6 +2,8 @@ using LBPUnion.ProjectLighthouse.Helpers; using LBPUnion.ProjectLighthouse.Serialization; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; +using LBPUnion.ProjectLighthouse.PlayerData; +using LBPUnion.ProjectLighthouse.Extensions; namespace LBPUnion.ProjectLighthouse.Servers.GameServer.Controllers; @@ -26,7 +28,7 @@ public class StatisticsController : ControllerBase [HttpGet("planetStats")] public async Task PlanetStats() { - int totalSlotCount = await StatisticsHelper.SlotCount(this.database); + int totalSlotCount = await StatisticsHelper.SlotCountForGame(this.database, this.GetToken().GameVersion); int mmPicksCount = await StatisticsHelper.TeamPickCount(this.database); return this.Ok @@ -37,5 +39,5 @@ public class StatisticsController : ControllerBase } [HttpGet("planetStats/totalLevelCount")] - public async Task TotalLevelCount() => this.Ok((await StatisticsHelper.SlotCount(this.database)).ToString()); -} \ No newline at end of file + public async Task TotalLevelCount() => this.Ok((await StatisticsHelper.SlotCountForGame(this.database, this.GetToken().GameVersion)).ToString()); +} diff --git a/ProjectLighthouse/Levels/Categories/HeartedCategory.cs b/ProjectLighthouse/Levels/Categories/HeartedCategory.cs index a7939746..e5f080df 100644 --- a/ProjectLighthouse/Levels/Categories/HeartedCategory.cs +++ b/ProjectLighthouse/Levels/Categories/HeartedCategory.cs @@ -11,7 +11,7 @@ namespace LBPUnion.ProjectLighthouse.Levels.Categories; public class HeartedCategory : CategoryWithUser { - public override string Name { get; set; } = "My Hearted Levels"; + public override string Name { get; set; } = "My Hearted Content"; public override string Description { get; set; } = "Content you've hearted"; public override string IconHash { get; set; } = "g820611"; public override string Endpoint { get; set; } = "hearted";