Additional tools for Admin portal, and huge NameSpace Revamp

This commit is contained in:
dingo
2025-12-26 09:10:43 -05:00
parent ba747d1891
commit 244635ca3f
133 changed files with 2153 additions and 4776 deletions
+23 -22
View File
@@ -7,7 +7,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Diagnostics.HealthChecks;
using Microsoft.Extensions.Hosting;
using Server.Data;
using DataServer.Data;
using Server.Networking;
using Server.Networking.Handling;
using Server.Networking.Messages;
@@ -15,7 +15,7 @@ using Server.Persistence;
using Server.Redis;
using Server.Services;
using Server.Services.Auth;
using VoidScavengers.Game;
using Server.Game;
var builder = WebApplication.CreateBuilder(args);
@@ -73,8 +73,8 @@ builder.Services.AddSingleton<IMessageSerializer, JsonSerializerAdapter>();
builder.Services.AddSingleton<IClientMessageHandler, AuthHandler>();
// Void Scavengers game
builder.Services.AddSingleton<MatchManager>();
builder.Services.AddSingleton<IClientMessageHandler, GameHandler>();
//builder.Services.AddSingleton<MatchManager>();
//builder.Services.AddSingleton<IClientMessageHandler, GameHandler>();
builder.Services.AddSingleton<DungeonHandler>();
builder.Services.AddSingleton<IClientMessageHandler>(sp => sp.GetRequiredService<DungeonHandler>());
builder.Services.AddSingleton<LootService>();
@@ -84,6 +84,7 @@ builder.Services.AddSingleton<MessageRouter>();
builder.Services.AddSingleton<IItemService, CachedItemService>();
builder.Services.AddSingleton<IAdminAuthService, AdminAuthService>();
builder.Services.AddSingleton<ICdnBrowserService, MinioCdnBrowserService>();
builder.Services.AddSingleton<IServerBroadcastService, ServerBroadcastService>();
builder.Services.AddHttpClient(); // For CDN file hash computation
// Health checks
@@ -122,25 +123,25 @@ catch (Exception ex)
app.Logger.LogError(ex, "Failed to resolve IMessageSerializer");
}
try
{
var matchMgr = app.Services.GetRequiredService<MatchManager>();
app.Logger.LogInformation("MatchManager resolved OK");
}
catch (Exception ex)
{
app.Logger.LogError(ex, "Failed to resolve MatchManager");
}
//try
//{
// var matchMgr = app.Services.GetRequiredService<MatchManager>();
// app.Logger.LogInformation("MatchManager resolved OK");
//}
//catch (Exception ex)
//{
// app.Logger.LogError(ex, "Failed to resolve MatchManager");
//}
try
{
var gameHandler = app.Services.GetRequiredService<GameHandler>();
app.Logger.LogInformation("GameHandler resolved OK, opcodes: {Ops}", string.Join(",", gameHandler.SupportedOpCodes));
}
catch (Exception ex)
{
app.Logger.LogError(ex, "Failed to resolve GameHandler");
}
//try
//{
// var gameHandler = app.Services.GetRequiredService<GameHandler>();
// app.Logger.LogInformation("GameHandler resolved OK, opcodes: {Ops}", string.Join(",", gameHandler.SupportedOpCodes));
//}
//catch (Exception ex)
//{
// app.Logger.LogError(ex, "Failed to resolve GameHandler");
//}
var handlers = app.Services.GetServices<IClientMessageHandler>().ToList();
app.Logger.LogInformation("IClientMessageHandler count: {Count}", handlers.Count);