diff --git a/Api/AdminController.cs b/Api/AdminController.cs index c49136a..68ce017 100644 --- a/Api/AdminController.cs +++ b/Api/AdminController.cs @@ -2,8 +2,8 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using DataServer.Data; using DataServer.Data.Entities; -using Server.Services.Auth; -using Server.Game.Dungeon; +using GameServices.Auth; +using GameServer.Dungeon; namespace Server.Api; diff --git a/Api/AuthApiController.cs b/Api/AuthApiController.cs index 8096fb4..01fad9f 100644 --- a/Api/AuthApiController.cs +++ b/Api/AuthApiController.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using DataServer.Data; -using Server.Services.Auth; +using GameServices.Auth; namespace Server.Api; diff --git a/Api/CdnBrowserController.cs b/Api/CdnBrowserController.cs index 2a2a1d6..55625fb 100644 --- a/Api/CdnBrowserController.cs +++ b/Api/CdnBrowserController.cs @@ -1,5 +1,5 @@ using Microsoft.AspNetCore.Mvc; -using Server.Services; +using GameServices; namespace Server.Api; diff --git a/Game/Dungeon/ChestInstance.cs b/Game/Dungeon/ChestInstance.cs index 0314f84..c0b2cab 100644 --- a/Game/Dungeon/ChestInstance.cs +++ b/Game/Dungeon/ChestInstance.cs @@ -1,4 +1,4 @@ -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; public class ChestInstance { diff --git a/Game/Dungeon/CombatCalculator.cs b/Game/Dungeon/CombatCalculator.cs index ddeea67..dd576fc 100644 --- a/Game/Dungeon/CombatCalculator.cs +++ b/Game/Dungeon/CombatCalculator.cs @@ -1,6 +1,6 @@ using DataServer.Data.Entities; -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Handles damage calculations with stats, gear, and resistances diff --git a/Game/Dungeon/CraftingHandler.cs b/Game/Dungeon/CraftingHandler.cs index 51c2cdf..dffbad8 100644 --- a/Game/Dungeon/CraftingHandler.cs +++ b/Game/Dungeon/CraftingHandler.cs @@ -7,7 +7,7 @@ using Server.Networking; using Server.Networking.Messages; using System.Text.Json; -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Handles crafting operations including recipe discovery, crafting, and skill progression diff --git a/Game/Dungeon/DungeonChestSpawn.cs b/Game/Dungeon/DungeonChestSpawn.cs index d483e62..a0bb416 100644 --- a/Game/Dungeon/DungeonChestSpawn.cs +++ b/Game/Dungeon/DungeonChestSpawn.cs @@ -1,4 +1,4 @@ -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; public class DungeonChestSpawn { diff --git a/Game/Dungeon/DungeonGenerator.cs b/Game/Dungeon/DungeonGenerator.cs index 7fb66bc..0d8bbc7 100644 --- a/Game/Dungeon/DungeonGenerator.cs +++ b/Game/Dungeon/DungeonGenerator.cs @@ -1,4 +1,4 @@ -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Procedural dungeon generator using BSP (Binary Space Partition) + room placement diff --git a/Game/Dungeon/DungeonGeneratorV2.cs b/Game/Dungeon/DungeonGeneratorV2.cs index 7240306..89f7e17 100644 --- a/Game/Dungeon/DungeonGeneratorV2.cs +++ b/Game/Dungeon/DungeonGeneratorV2.cs @@ -3,7 +3,7 @@ using DataServer.Data.Entities; using Microsoft.EntityFrameworkCore; using System.Text.Json; -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Procedural dungeon generator using room templates from database diff --git a/Game/Dungeon/DungeonGeneratorV3.cs b/Game/Dungeon/DungeonGeneratorV3.cs index 4cee34d..bde2a9a 100644 --- a/Game/Dungeon/DungeonGeneratorV3.cs +++ b/Game/Dungeon/DungeonGeneratorV3.cs @@ -3,7 +3,7 @@ using DataServer.Data.Entities; using Microsoft.EntityFrameworkCore; using System.Text.Json; -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Dungeon Generator V3 - Uses the DungeonBuilder system diff --git a/Game/Dungeon/DungeonHandler.cs b/Game/Dungeon/DungeonHandler.cs index 523342f..244edb7 100644 --- a/Game/Dungeon/DungeonHandler.cs +++ b/Game/Dungeon/DungeonHandler.cs @@ -10,10 +10,10 @@ using Server.Networking; using Server.Networking.Handling; using Server.Networking.Messages; using Server.Redis; -using Server.Services; -using Server.Services.Auth; +using GameServices; +using GameServices.Auth; -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Handles dungeon crawler game messages via the server's message router diff --git a/Game/Dungeon/DungeonHandlerAdmin.cs b/Game/Dungeon/DungeonHandlerAdmin.cs index ab1de91..ab60899 100644 --- a/Game/Dungeon/DungeonHandlerAdmin.cs +++ b/Game/Dungeon/DungeonHandlerAdmin.cs @@ -1,6 +1,6 @@ using System.Collections.Concurrent; -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Admin/management extensions for DungeonHandler @@ -42,7 +42,7 @@ public partial class DungeonHandler // Note: This is a simplified version - in production you'd want to // properly handle player state transitions //dungeon.Simulation.RemovePlayer(player.CharacterId); - Console.WriteLine("Force Close Dungeon -- Needs Implemented"); + Console.WriteLine("Remove Player - Not Implemented."); } catch { /* Ignore errors during cleanup */ } } diff --git a/Game/Dungeon/DungeonInstance.cs b/Game/Dungeon/DungeonInstance.cs index 657c7d7..1e6b872 100644 --- a/Game/Dungeon/DungeonInstance.cs +++ b/Game/Dungeon/DungeonInstance.cs @@ -1,4 +1,4 @@ -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Represents an active dungeon instance diff --git a/Game/Dungeon/DungeonLayout.cs b/Game/Dungeon/DungeonLayout.cs index 109f83b..e7ac531 100644 --- a/Game/Dungeon/DungeonLayout.cs +++ b/Game/Dungeon/DungeonLayout.cs @@ -1,6 +1,6 @@ using System.Text.Json; -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Contains the generated dungeon layout data diff --git a/Game/Dungeon/DungeonLayoutV2.cs b/Game/Dungeon/DungeonLayoutV2.cs index f6671b8..68ec32c 100644 --- a/Game/Dungeon/DungeonLayoutV2.cs +++ b/Game/Dungeon/DungeonLayoutV2.cs @@ -1,7 +1,7 @@ using DataServer.Data.Entities; using System.Text.Json; -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Enhanced dungeon layout with full tile visual information diff --git a/Game/Dungeon/DungeonMobSpawn.cs b/Game/Dungeon/DungeonMobSpawn.cs index a621dcc..d5f16cc 100644 --- a/Game/Dungeon/DungeonMobSpawn.cs +++ b/Game/Dungeon/DungeonMobSpawn.cs @@ -1,4 +1,4 @@ -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; public class DungeonMobSpawn { diff --git a/Game/Dungeon/DungeonPhase.cs b/Game/Dungeon/DungeonPhase.cs index 27b4d34..2791c81 100644 --- a/Game/Dungeon/DungeonPhase.cs +++ b/Game/Dungeon/DungeonPhase.cs @@ -1,4 +1,5 @@ -public enum DungeonPhase +namespace GameServer.Dungeon; +public enum DungeonPhase { Active, Cleared, diff --git a/Game/Dungeon/DungeonPlayerSession.cs b/Game/Dungeon/DungeonPlayerSession.cs index 3990e1b..c61726e 100644 --- a/Game/Dungeon/DungeonPlayerSession.cs +++ b/Game/Dungeon/DungeonPlayerSession.cs @@ -2,7 +2,7 @@ using DataServer.Data.Entities; using DataServer.Data.Enums; using Server.Networking; -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Tracks a player's dungeon session state diff --git a/Game/Dungeon/DungeonPoint.cs b/Game/Dungeon/DungeonPoint.cs index 763f2e1..bdeb2b0 100644 --- a/Game/Dungeon/DungeonPoint.cs +++ b/Game/Dungeon/DungeonPoint.cs @@ -1,4 +1,4 @@ -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; public struct DungeonPoint { diff --git a/Game/Dungeon/DungeonRoom.cs b/Game/Dungeon/DungeonRoom.cs index 187ae29..83cafbb 100644 --- a/Game/Dungeon/DungeonRoom.cs +++ b/Game/Dungeon/DungeonRoom.cs @@ -1,4 +1,4 @@ -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; public class DungeonRoom { diff --git a/Game/Dungeon/DungeonRoomV2.cs b/Game/Dungeon/DungeonRoomV2.cs index e7ebe8e..7fbf287 100644 --- a/Game/Dungeon/DungeonRoomV2.cs +++ b/Game/Dungeon/DungeonRoomV2.cs @@ -1,6 +1,6 @@ using DataServer.Data.Entities; -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Extended room with template info diff --git a/Game/Dungeon/DungeonSimulation.cs b/Game/Dungeon/DungeonSimulation.cs index 24e6b4a..66ddc1d 100644 --- a/Game/Dungeon/DungeonSimulation.cs +++ b/Game/Dungeon/DungeonSimulation.cs @@ -2,7 +2,7 @@ using System.Collections.Concurrent; using DataServer.Data.Entities; using DataServer.Data.Enums; -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Runtime simulation for an active dungeon instance @@ -1050,6 +1050,7 @@ public partial class DungeonSimulation float dy = y2 - y1; return MathF.Sqrt(dx * dx + dy * dy); } + } diff --git a/Game/Dungeon/DungeonSimulationAdmin.cs b/Game/Dungeon/DungeonSimulationAdmin.cs index deac2b4..2bb996b 100644 --- a/Game/Dungeon/DungeonSimulationAdmin.cs +++ b/Game/Dungeon/DungeonSimulationAdmin.cs @@ -1,4 +1,4 @@ -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Admin extensions for DungeonSimulation diff --git a/Game/Dungeon/DungeonVisualTileExtensions.cs b/Game/Dungeon/DungeonVisualTileExtensions.cs index a6c398c..b4ec699 100644 --- a/Game/Dungeon/DungeonVisualTileExtensions.cs +++ b/Game/Dungeon/DungeonVisualTileExtensions.cs @@ -3,7 +3,7 @@ using DataServer.Data.Entities; using Microsoft.EntityFrameworkCore; using System.Text.Json; -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Extension methods for visual tile data diff --git a/Game/Dungeon/LootChestInstance.cs b/Game/Dungeon/LootChestInstance.cs index af45beb..70d784e 100644 --- a/Game/Dungeon/LootChestInstance.cs +++ b/Game/Dungeon/LootChestInstance.cs @@ -1,4 +1,4 @@ -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Runtime instance of a personal loot chest (from death overflow) diff --git a/Game/Dungeon/LootService.cs b/Game/Dungeon/LootService.cs index 916a34b..0fccfdd 100644 --- a/Game/Dungeon/LootService.cs +++ b/Game/Dungeon/LootService.cs @@ -4,7 +4,7 @@ using Microsoft.Extensions.Logging; using DataServer.Data; using DataServer.Data.Entities; -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Generated loot result - an item with quantity diff --git a/Game/Dungeon/MobAI.cs b/Game/Dungeon/MobAI.cs index de5bcd2..b6f55e4 100644 --- a/Game/Dungeon/MobAI.cs +++ b/Game/Dungeon/MobAI.cs @@ -1,7 +1,7 @@ using DataServer.Data.Entities; using DataServer.Data.Enums; -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Handles mob AI behavior and decision making diff --git a/Game/Dungeon/MobInstance.cs b/Game/Dungeon/MobInstance.cs index ebf9952..91b196b 100644 --- a/Game/Dungeon/MobInstance.cs +++ b/Game/Dungeon/MobInstance.cs @@ -1,7 +1,7 @@ using DataServer.Data.Entities; using DataServer.Data.Enums; -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Loot carried by a mob from killing a player diff --git a/Game/Dungeon/MobSpriteConfigBuilder.cs b/Game/Dungeon/MobSpriteConfigBuilder.cs index 724c804..403345f 100644 --- a/Game/Dungeon/MobSpriteConfigBuilder.cs +++ b/Game/Dungeon/MobSpriteConfigBuilder.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using DataServer.Data; using DataServer.Data.Entities; -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Builds sprite configuration JSON for mobs from the database animation system diff --git a/Game/Dungeon/PlacedTile.cs b/Game/Dungeon/PlacedTile.cs index 505f027..c5e4bdd 100644 --- a/Game/Dungeon/PlacedTile.cs +++ b/Game/Dungeon/PlacedTile.cs @@ -1,4 +1,4 @@ -namespace Server.Game.Dungeon +namespace GameServer.Dungeon { /// /// Placed tile with details diff --git a/Game/Dungeon/PlayerInstance.cs b/Game/Dungeon/PlayerInstance.cs index a328144..b9f8248 100644 --- a/Game/Dungeon/PlayerInstance.cs +++ b/Game/Dungeon/PlayerInstance.cs @@ -1,4 +1,4 @@ -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Runtime instance of a player in a dungeon diff --git a/Game/Dungeon/PortalInstance.cs b/Game/Dungeon/PortalInstance.cs index 95327aa..0b8b854 100644 --- a/Game/Dungeon/PortalInstance.cs +++ b/Game/Dungeon/PortalInstance.cs @@ -1,4 +1,4 @@ -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// Runtime instance of a portal in a dungeon diff --git a/Game/Dungeon/ProjectileInstance.cs b/Game/Dungeon/ProjectileInstance.cs index 738ed0a..0dd32ae 100644 --- a/Game/Dungeon/ProjectileInstance.cs +++ b/Game/Dungeon/ProjectileInstance.cs @@ -1,4 +1,4 @@ -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; /// /// A projectile in flight diff --git a/Game/Dungeon/TagDrivenTiles.cs b/Game/Dungeon/TagDrivenTiles.cs index 1d5ef0c..a3672a3 100644 --- a/Game/Dungeon/TagDrivenTiles.cs +++ b/Game/Dungeon/TagDrivenTiles.cs @@ -7,7 +7,7 @@ using System; using System.Collections.Generic; using System.Linq; -namespace Server.Game.Dungeon +namespace GameServer.Dungeon { /// /// Normalized tag info: supports comma/space separated tokens + key:value tags. diff --git a/Game/Dungeon/TickResult.cs b/Game/Dungeon/TickResult.cs index d1b6422..c401a09 100644 --- a/Game/Dungeon/TickResult.cs +++ b/Game/Dungeon/TickResult.cs @@ -1,4 +1,4 @@ -namespace Server.Game.Dungeon; +namespace GameServer.Dungeon; public class TickResult { diff --git a/Game/Dungeon/TileMapSheetInfo.cs b/Game/Dungeon/TileMapSheetInfo.cs index abf6889..985bc7f 100644 --- a/Game/Dungeon/TileMapSheetInfo.cs +++ b/Game/Dungeon/TileMapSheetInfo.cs @@ -1,4 +1,4 @@ -namespace Server.Game.Dungeon +namespace GameServer.Dungeon { /// /// Tilemap sheet info for client diff --git a/Networking/NetworkManager.cs b/Networking/NetworkManager.cs index 6919d10..77df84e 100644 --- a/Networking/NetworkManager.cs +++ b/Networking/NetworkManager.cs @@ -5,7 +5,7 @@ using System.Net.WebSockets; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Logging; using Server.Redis; -using Server.Services.Auth; +using GameServices.Auth; using StackExchange.Redis; namespace Server.Networking; diff --git a/Program.cs b/Program.cs index 8a5e01f..699bc46 100644 --- a/Program.cs +++ b/Program.cs @@ -1,6 +1,6 @@ using System.Net; using System.Net.Sockets; -using Server.Game.Dungeon; +using GameServer.Dungeon; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft.EntityFrameworkCore; @@ -12,9 +12,9 @@ using Server.Networking; using Server.Networking.Handling; using Server.Networking.Messages; using Server.Redis; -using Server.Services; -using Server.Services.Auth; -using Server.Game; +using GameServices; +using GameServices.Auth; +using GameServer; var builder = WebApplication.CreateBuilder(args); diff --git a/Services/Admin/Pages/Abilities/Edit.cshtml.cs b/Services/Admin/Pages/Abilities/Edit.cshtml.cs index cc870d6..9ce1eff 100644 --- a/Services/Admin/Pages/Abilities/Edit.cshtml.cs +++ b/Services/Admin/Pages/Abilities/Edit.cshtml.cs @@ -4,7 +4,7 @@ using DataServer.Data; using DataServer.Data.Entities; using DataServer.Data.Enums; -namespace Server.Services.Admin.Pages.Abilities; +namespace GameServices.Admin.Pages.Abilities; public class EditModel : AdminPageModel { diff --git a/Services/Admin/Pages/Abilities/Index.cshtml.cs b/Services/Admin/Pages/Abilities/Index.cshtml.cs index 1d71cd8..8f5ddc4 100644 --- a/Services/Admin/Pages/Abilities/Index.cshtml.cs +++ b/Services/Admin/Pages/Abilities/Index.cshtml.cs @@ -4,7 +4,7 @@ using DataServer.Data; using DataServer.Data.Entities; using DataServer.Data.Enums; -namespace Server.Services.Admin.Pages.Abilities; +namespace GameServices.Admin.Pages.Abilities; public class IndexModel : AdminPageModel { diff --git a/Services/Admin/Pages/AdminPageModel.cs b/Services/Admin/Pages/AdminPageModel.cs index 9de1933..01b2176 100644 --- a/Services/Admin/Pages/AdminPageModel.cs +++ b/Services/Admin/Pages/AdminPageModel.cs @@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Server.Services.Admin.Pages; +namespace GameServices.Admin.Pages; /// /// Base class for all admin pages that require authentication diff --git a/Services/Admin/Pages/Api.cshtml.cs b/Services/Admin/Pages/Api.cshtml.cs index ed67a3e..400b3ee 100644 --- a/Services/Admin/Pages/Api.cshtml.cs +++ b/Services/Admin/Pages/Api.cshtml.cs @@ -1,8 +1,8 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -using Server.Game.Dungeon; +using GameServer.Dungeon; -namespace Server.Services.Admin.Pages; +namespace GameServices.Admin.Pages; public class ApiModel : AdminPageModel { diff --git a/Services/Admin/Pages/Assets/Index.cshtml.cs b/Services/Admin/Pages/Assets/Index.cshtml.cs index 0cff60e..07fc746 100644 --- a/Services/Admin/Pages/Assets/Index.cshtml.cs +++ b/Services/Admin/Pages/Assets/Index.cshtml.cs @@ -2,11 +2,11 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using DataServer.Data; using DataServer.Data.Entities; -using Server.Services; +using GameServices; using System.Net.Http; using System.Security.Cryptography; -namespace Server.Services.Admin.Pages.Assets; +namespace GameServices.Admin.Pages.Assets; public class IndexModel : AdminPageModel { diff --git a/Services/Admin/Pages/Broadcast/Index.cshtml.cs b/Services/Admin/Pages/Broadcast/Index.cshtml.cs index 70f8533..b22a47e 100644 --- a/Services/Admin/Pages/Broadcast/Index.cshtml.cs +++ b/Services/Admin/Pages/Broadcast/Index.cshtml.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Server.Redis; -namespace Server.Services.Admin.Pages.Broadcast; +namespace GameServices.Admin.Pages.Broadcast; public class IndexModel : AdminPageModel { diff --git a/Services/Admin/Pages/DungeonBuilder/Index.cshtml.cs b/Services/Admin/Pages/DungeonBuilder/Index.cshtml.cs index 45120e9..b19dc69 100644 --- a/Services/Admin/Pages/DungeonBuilder/Index.cshtml.cs +++ b/Services/Admin/Pages/DungeonBuilder/Index.cshtml.cs @@ -3,7 +3,7 @@ using DataServer.Data.Entities; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -namespace Server.Services.Admin.Pages.DungeonBuilder; +namespace GameServices.Admin.Pages.DungeonBuilder; public class IndexModel : AdminPageModel { diff --git a/Services/Admin/Pages/DungeonBuilder/ObjectEdit.cshtml.cs b/Services/Admin/Pages/DungeonBuilder/ObjectEdit.cshtml.cs index 9d23597..6e43900 100644 --- a/Services/Admin/Pages/DungeonBuilder/ObjectEdit.cshtml.cs +++ b/Services/Admin/Pages/DungeonBuilder/ObjectEdit.cshtml.cs @@ -3,7 +3,7 @@ using DataServer.Data.Entities; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -namespace Server.Services.Admin.Pages.DungeonBuilder; +namespace GameServices.Admin.Pages.DungeonBuilder; public class ObjectEditModel : AdminPageModel { diff --git a/Services/Admin/Pages/DungeonBuilder/Objects.cshtml.cs b/Services/Admin/Pages/DungeonBuilder/Objects.cshtml.cs index d5f6a08..75023ee 100644 --- a/Services/Admin/Pages/DungeonBuilder/Objects.cshtml.cs +++ b/Services/Admin/Pages/DungeonBuilder/Objects.cshtml.cs @@ -3,7 +3,7 @@ using DataServer.Data.Entities; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -namespace Server.Services.Admin.Pages.DungeonBuilder; +namespace GameServices.Admin.Pages.DungeonBuilder; public class ObjectsModel : AdminPageModel { diff --git a/Services/Admin/Pages/DungeonBuilder/PaletteEdit.cshtml.cs b/Services/Admin/Pages/DungeonBuilder/PaletteEdit.cshtml.cs index 3686d8a..ce31cd5 100644 --- a/Services/Admin/Pages/DungeonBuilder/PaletteEdit.cshtml.cs +++ b/Services/Admin/Pages/DungeonBuilder/PaletteEdit.cshtml.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using System.Text.Json; -namespace Server.Services.Admin.Pages.DungeonBuilder; +namespace GameServices.Admin.Pages.DungeonBuilder; public class PaletteEditModel : AdminPageModel { diff --git a/Services/Admin/Pages/DungeonBuilder/Palettes.cshtml.cs b/Services/Admin/Pages/DungeonBuilder/Palettes.cshtml.cs index fe7534b..3be1115 100644 --- a/Services/Admin/Pages/DungeonBuilder/Palettes.cshtml.cs +++ b/Services/Admin/Pages/DungeonBuilder/Palettes.cshtml.cs @@ -3,7 +3,7 @@ using DataServer.Data.Entities; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -namespace Server.Services.Admin.Pages.DungeonBuilder; +namespace GameServices.Admin.Pages.DungeonBuilder; public class PalettesModel : AdminPageModel { diff --git a/Services/Admin/Pages/DungeonBuilder/RoomEdit.cshtml.cs b/Services/Admin/Pages/DungeonBuilder/RoomEdit.cshtml.cs index 9504790..615f39c 100644 --- a/Services/Admin/Pages/DungeonBuilder/RoomEdit.cshtml.cs +++ b/Services/Admin/Pages/DungeonBuilder/RoomEdit.cshtml.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using System.Text.Json; -namespace Server.Services.Admin.Pages.DungeonBuilder; +namespace GameServices.Admin.Pages.DungeonBuilder; public class RoomEditModel : AdminPageModel { diff --git a/Services/Admin/Pages/DungeonBuilder/Rooms.cshtml.cs b/Services/Admin/Pages/DungeonBuilder/Rooms.cshtml.cs index bf69f77..a7bd8b6 100644 --- a/Services/Admin/Pages/DungeonBuilder/Rooms.cshtml.cs +++ b/Services/Admin/Pages/DungeonBuilder/Rooms.cshtml.cs @@ -3,7 +3,7 @@ using DataServer.Data.Entities; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; -namespace Server.Services.Admin.Pages.DungeonBuilder; +namespace GameServices.Admin.Pages.DungeonBuilder; public class RoomsModel : AdminPageModel { diff --git a/Services/Admin/Pages/DungeonBuilder/TestGen.cshtml.cs b/Services/Admin/Pages/DungeonBuilder/TestGen.cshtml.cs index f2f2cf3..b797415 100644 --- a/Services/Admin/Pages/DungeonBuilder/TestGen.cshtml.cs +++ b/Services/Admin/Pages/DungeonBuilder/TestGen.cshtml.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using System.Diagnostics; -namespace Server.Services.Admin.Pages.DungeonBuilder; +namespace GameServices.Admin.Pages.DungeonBuilder; public class TestGenModel : AdminPageModel { diff --git a/Services/Admin/Pages/DungeonBuilder/TileEdit.cshtml.cs b/Services/Admin/Pages/DungeonBuilder/TileEdit.cshtml.cs index 558758f..a06be8e 100644 --- a/Services/Admin/Pages/DungeonBuilder/TileEdit.cshtml.cs +++ b/Services/Admin/Pages/DungeonBuilder/TileEdit.cshtml.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using System.Text.Json; -namespace Server.Services.Admin.Pages.DungeonBuilder; +namespace GameServices.Admin.Pages.DungeonBuilder; public class TileEditModel : AdminPageModel { diff --git a/Services/Admin/Pages/DungeonBuilder/Tiles.cshtml.cs b/Services/Admin/Pages/DungeonBuilder/Tiles.cshtml.cs index 5a9d05f..e59b706 100644 --- a/Services/Admin/Pages/DungeonBuilder/Tiles.cshtml.cs +++ b/Services/Admin/Pages/DungeonBuilder/Tiles.cshtml.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using System.Text.Json; -namespace Server.Services.Admin.Pages.DungeonBuilder; +namespace GameServices.Admin.Pages.DungeonBuilder; public class TilesModel : AdminPageModel { diff --git a/Services/Admin/Pages/Dungeons/Index.cshtml b/Services/Admin/Pages/Dungeons/Index.cshtml index ee1478f..b7ca729 100644 --- a/Services/Admin/Pages/Dungeons/Index.cshtml +++ b/Services/Admin/Pages/Dungeons/Index.cshtml @@ -91,9 +91,9 @@
@@ -126,7 +126,11 @@

- Active Dungeons (@Model.Dungeons.Count) + Dungeons (@Model.Dungeons.Count) + @if (string.IsNullOrEmpty(Model.StatusFilter) || Model.StatusFilter == "active") + { + (active only) + }

@if (Model.Dungeons.Count > 0) diff --git a/Services/Admin/Pages/Dungeons/Index.cshtml.cs b/Services/Admin/Pages/Dungeons/Index.cshtml.cs index 686630a..3e86142 100644 --- a/Services/Admin/Pages/Dungeons/Index.cshtml.cs +++ b/Services/Admin/Pages/Dungeons/Index.cshtml.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Mvc; -using Server.Game.Dungeon; +using GameServer.Dungeon; -namespace Server.Services.Admin.Pages.Dungeons; +namespace GameServices.Admin.Pages.Dungeons; public class IndexModel : AdminPageModel { @@ -37,12 +37,20 @@ public class IndexModel : AdminPageModel // Apply filters var filtered = allDungeons.AsEnumerable(); - if (!string.IsNullOrEmpty(status)) + // By default, show only active dungeons (exclude cleared/completed) + if (string.IsNullOrEmpty(status)) { - if (status == "active") - filtered = filtered.Where(d => d.Simulation.Phase == DungeonPhase.Active); - else if (status == "completed") - filtered = filtered.Where(d => d.Simulation.Phase == DungeonPhase.Cleared); + // Default: Active only + filtered = filtered.Where(d => d.Simulation.Phase == DungeonPhase.Active); + } + else if (status == "cleared") + { + // Show completed and cleared + filtered = filtered.Where(d => d.Simulation.Phase == DungeonPhase.Cleared || d.Simulation.Phase == DungeonPhase.Cleared); + } + else if (status == "all") + { + // Show all - no filter } if (tier.HasValue) diff --git a/Services/Admin/Pages/Dungeons/View.cshtml b/Services/Admin/Pages/Dungeons/View.cshtml index e59fdfa..e77da0b 100644 --- a/Services/Admin/Pages/Dungeons/View.cshtml +++ b/Services/Admin/Pages/Dungeons/View.cshtml @@ -1,5 +1,5 @@ @page "/admin/dungeons/view" -@model Admin.Pages.Dungeons.ViewModel +@model GameServices.Admin.Pages.Dungeons.ViewModel @{ ViewData["Title"] = $"Dungeon View - Tier {Model.Dungeon?.Tier}"; } @@ -19,7 +19,12 @@ position: absolute; border-radius: 50%; transform: translate(-50%, -50%); - pointer-events: none; + cursor: pointer; + transition: transform 0.1s; + } + .entity-dot:hover { + transform: translate(-50%, -50%) scale(1.5); + z-index: 100; } .player-dot { background: #4ade80; @@ -29,8 +34,11 @@ } .mob-dot { background: #f87171; - width: 6px; - height: 6px; + width: 8px; + height: 8px; + } + .mob-dot:hover { + box-shadow: 0 0 8px #f87171; } .boss-dot { background: #fbbf24; @@ -38,6 +46,10 @@ height: 12px; box-shadow: 0 0 8px #fbbf24; } + .mob-dot.selected, .boss-dot.selected { + outline: 2px solid white; + outline-offset: 2px; + } .stat-card { background: rgba(30, 30, 50, 0.8); border: 1px solid #374151; @@ -64,6 +76,22 @@ background: linear-gradient(90deg, #ef4444, #22c55e); transition: width 0.3s ease; } + .mob-inspector { + background: rgba(20, 20, 40, 0.95); + border: 1px solid #4f46e5; + border-radius: 8px; + padding: 16px; + min-width: 280px; + } + .inspector-stat { + display: flex; + justify-content: space-between; + padding: 4px 0; + border-bottom: 1px solid rgba(255,255,255,0.1); + } + .inspector-stat:last-child { + border-bottom: none; + }
@@ -89,7 +117,7 @@ else

Live Dungeon Map

- Live + 500ms @@ -108,7 +136,7 @@ else
- Mobs + Mobs (click to inspect)
@@ -118,10 +146,32 @@ else
Floor
-
-
- Wall -
+
+
+ + +
@@ -150,7 +200,7 @@ else
Phase - + @Model.Dungeon.Simulation.Phase
@@ -194,6 +244,37 @@ else + +
+

Spawn Mob

+
+ +
+
+ + +
+
+ + +
+
+ +

Click on map to set spawn position

+
+
+

Players (@Model.Dungeon.Simulation.Players.Count)

@@ -256,9 +337,13 @@ else const mapWidth = @(Model.MapWidth); const mapHeight = @(Model.MapHeight); const walkableData = @Html.Raw(Model.WalkableJson); + const tileSize = 32; let autoRefresh = true; let refreshInterval; + let selectedMobId = null; + let currentMobs = []; + let mapScale = 4; function initMap() { const canvas = document.getElementById('mapCanvas'); @@ -266,14 +351,14 @@ else if (!canvas || !container) return; const ctx = canvas.getContext('2d'); - const scale = Math.min( + mapScale = Math.min( (container.clientWidth - 20) / mapWidth, (container.clientHeight - 20) / mapHeight, 8 // Max scale ); - canvas.width = mapWidth * scale; - canvas.height = mapHeight * scale; + canvas.width = mapWidth * mapScale; + canvas.height = mapHeight * mapScale; canvas.style.width = canvas.width + 'px'; canvas.style.height = canvas.height + 'px'; @@ -284,16 +369,25 @@ else const walkable = walkableData[idx]; ctx.fillStyle = walkable ? '#1e3a5f' : '#1a1a2e'; - ctx.fillRect(x * scale, y * scale, scale, scale); + ctx.fillRect(x * mapScale, y * mapScale, mapScale, mapScale); // Grid lines ctx.strokeStyle = 'rgba(255,255,255,0.05)'; - ctx.strokeRect(x * scale, y * scale, scale, scale); + ctx.strokeRect(x * mapScale, y * mapScale, mapScale, mapScale); } } // Store scale for entity positioning - canvas.dataset.scale = scale; + canvas.dataset.scale = mapScale; + + // Click handler for spawn position + canvas.onclick = function(e) { + const rect = canvas.getBoundingClientRect(); + const x = Math.floor((e.clientX - rect.left) / mapScale) * tileSize + tileSize / 2; + const y = Math.floor((e.clientY - rect.top) / mapScale) * tileSize + tileSize / 2; + document.getElementById('spawnX').value = Math.round(x); + document.getElementById('spawnY').value = Math.round(y); + }; } function updateEntities(players, mobs) { @@ -301,18 +395,16 @@ else const overlay = document.getElementById('entityOverlay'); if (!canvas || !overlay) return; - const scale = parseFloat(canvas.dataset.scale) || 4; - const tileSize = 32; // Game tile size - + currentMobs = mobs; overlay.innerHTML = ''; // Draw players players.forEach(p => { const div = document.createElement('div'); div.className = 'entity-dot player-dot'; - div.style.left = (p.x / tileSize * scale) + 'px'; - div.style.top = (p.y / tileSize * scale) + 'px'; - div.title = p.name; + div.style.left = (p.x / tileSize * mapScale) + 'px'; + div.style.top = (p.y / tileSize * mapScale) + 'px'; + div.title = `${p.name} (${Math.round(p.x)}, ${Math.round(p.y)})`; overlay.appendChild(div); }); @@ -321,13 +413,105 @@ else if (!m.alive) return; const div = document.createElement('div'); div.className = 'entity-dot ' + (m.isBoss ? 'boss-dot' : 'mob-dot'); - div.style.left = (m.x / tileSize * scale) + 'px'; - div.style.top = (m.y / tileSize * scale) + 'px'; - div.title = m.name; + if (m.id === selectedMobId) div.classList.add('selected'); + div.style.left = (m.x / tileSize * mapScale) + 'px'; + div.style.top = (m.y / tileSize * mapScale) + 'px'; + div.title = `${m.name} - Click to inspect`; + div.dataset.mobId = m.id; + div.onclick = (e) => { + e.stopPropagation(); + selectMob(m); + }; overlay.appendChild(div); }); } + function selectMob(mob) { + selectedMobId = mob.id; + + // Update selection visual + document.querySelectorAll('.entity-dot').forEach(d => d.classList.remove('selected')); + document.querySelector(`[data-mob-id="${mob.id}"]`)?.classList.add('selected'); + + // Show inspector + const inspector = document.getElementById('mobInspector'); + inspector.classList.remove('hidden'); + + document.getElementById('inspectorMobName').textContent = mob.name + (mob.isBoss ? ' ⭐' : ''); + + document.getElementById('inspectorContent').innerHTML = ` +
ID${mob.id}
+
Type${mob.type || 'Normal'}
+
Health${mob.health} / ${mob.maxHealth}
+
Position${Math.round(mob.x)}, ${Math.round(mob.y)}
+
State${mob.state || 'Unknown'}
+
Definition ID${mob.definitionId || 'N/A'}
+ `; + } + + function closeMobInspector() { + selectedMobId = null; + document.getElementById('mobInspector').classList.add('hidden'); + document.querySelectorAll('.entity-dot').forEach(d => d.classList.remove('selected')); + } + + async function killSelectedMob() { + if (!selectedMobId) return; + + try { + const resp = await fetch(`/admin/dungeons/view?handler=KillMob&id=${dungeonId}&mobId=${selectedMobId}`, { + method: 'POST', + headers: { 'RequestVerificationToken': document.querySelector('[name="__RequestVerificationToken"]').value } + }); + + if (resp.ok) { + closeMobInspector(); + fetchUpdate(); + } else { + alert('Failed to kill mob'); + } + } catch (e) { + console.error('Failed to kill mob:', e); + alert('Error killing mob'); + } + } + + function teleportToMob() { + const mob = currentMobs.find(m => m.id === selectedMobId); + if (mob) { + navigator.clipboard.writeText(`${Math.round(mob.x)}, ${Math.round(mob.y)}`); + alert(`Position copied: ${Math.round(mob.x)}, ${Math.round(mob.y)}`); + } + } + + async function spawnMob() { + const mobDefId = document.getElementById('spawnMobSelect').value; + const x = document.getElementById('spawnX').value; + const y = document.getElementById('spawnY').value; + + if (!mobDefId) { + alert('Please select a mob to spawn'); + return; + } + + try { + const resp = await fetch(`/admin/dungeons/view?handler=SpawnMob&id=${dungeonId}&mobDefId=${mobDefId}&x=${x}&y=${y}`, { + method: 'POST', + headers: { 'RequestVerificationToken': document.querySelector('[name="__RequestVerificationToken"]').value } + }); + + if (resp.ok) { + fetchUpdate(); + } else { + const text = await resp.text(); + alert('Failed to spawn mob: ' + text); + } + } catch (e) { + console.error('Failed to spawn mob:', e); + alert('Error spawning mob'); + } + } + async function fetchUpdate() { try { const resp = await fetch(`/admin/dungeons/view?handler=Status&id=${dungeonId}`); @@ -337,6 +521,16 @@ else document.getElementById('mobCount').textContent = data.mobsAlive; document.getElementById('duration').textContent = data.duration; updateEntities(data.players, data.mobs); + + // Update selected mob info if still selected + if (selectedMobId) { + const mob = data.mobs.find(m => m.id === selectedMobId); + if (mob && mob.alive) { + selectMob(mob); + } else { + closeMobInspector(); + } + } } } catch (e) { console.error('Failed to fetch update:', e); @@ -348,7 +542,7 @@ else document.getElementById('autoRefreshBtn').textContent = 'Auto: ' + (autoRefresh ? 'ON' : 'OFF'); if (autoRefresh) { - refreshInterval = setInterval(fetchUpdate, 2000); + refreshInterval = setInterval(fetchUpdate, 500); } else { clearInterval(refreshInterval); } @@ -363,8 +557,8 @@ else const initialMobs = @Html.Raw(Model.MobsJson); updateEntities(initialPlayers, initialMobs); - // Start auto-refresh - refreshInterval = setInterval(fetchUpdate, 2000); + // Start auto-refresh at 500ms (faster updates) + refreshInterval = setInterval(fetchUpdate, 500); }); // Handle resize diff --git a/Services/Admin/Pages/Dungeons/View.cshtml.cs b/Services/Admin/Pages/Dungeons/View.cshtml.cs index 879de4e..68c5b07 100644 --- a/Services/Admin/Pages/Dungeons/View.cshtml.cs +++ b/Services/Admin/Pages/Dungeons/View.cshtml.cs @@ -1,19 +1,24 @@ using Microsoft.AspNetCore.Mvc; -using Server.Game.Dungeon; +using Microsoft.EntityFrameworkCore; +using GameServer.Dungeon; +using DataServer.Data; +using DataServer.Data.Entities; using System.Text.Json; -namespace Server.Services.Admin.Pages.Dungeons; +namespace GameServices.Admin.Pages.Dungeons; public class ViewModel : AdminPageModel { private readonly DungeonHandler _dungeonHandler; + private readonly GameDbContext _db; - public ViewModel(DungeonHandler dungeonHandler) + public ViewModel(DungeonHandler dungeonHandler, GameDbContext db) { _dungeonHandler = dungeonHandler; + _db = db; } - public DungeonInstance? Dungeon { get; set; } + public GameServer.Dungeon.DungeonInstance? Dungeon { get; set; } public string Duration { get; set; } = ""; public int RoomCount { get; set; } public int MapWidth { get; set; } @@ -21,18 +26,25 @@ public class ViewModel : AdminPageModel public string WalkableJson { get; set; } = "[]"; public string PlayersJson { get; set; } = "[]"; public string MobsJson { get; set; } = "[]"; + public List MobDefinitions { get; set; } = new(); - public void OnGet(Guid id) + public async Task OnGetAsync(Guid id) { Dungeon = _dungeonHandler.GetDungeon(id); + // Load mob definitions for spawn dropdown + MobDefinitions = await _db.DungeonMobDefinitions + .Where(m => m.IsEnabled) + .OrderBy(m => m.Name) + .ToListAsync(); + if (Dungeon == null) return; Duration = FormatDuration(DateTime.UtcNow - Dungeon.CreatedAt); RoomCount = Dungeon.LayoutV2?.Rooms?.Count ?? Dungeon.Simulation.Layout.Rooms.Count; // Get map dimensions - var layout = Dungeon.LayoutV2 ?? (DungeonLayoutV2?)null; + var layout = Dungeon.LayoutV2; if (layout != null) { MapWidth = layout.Width; @@ -72,11 +84,17 @@ public class ViewModel : AdminPageModel MobsJson = JsonSerializer.Serialize( Dungeon.Simulation.Mobs.Values.Select(m => new { + id = m.Id.ToString(), name = m.Name, x = m.X, y = m.Y, + health = m.Health, + maxHealth = m.MaxHealth, alive = m.IsAlive, - isBoss = m.Type == DataServer.Data.Enums.MobType.Boss + isBoss = m.Type == DataServer.Data.Enums.MobType.Boss, + type = m.Type.ToString(), + state = m.State.ToString() ?? "Idle", + definitionId = m.DefinitionId }) ); } @@ -98,17 +116,84 @@ public class ViewModel : AdminPageModel x = p.X, y = p.Y }), - mobs = dungeon.Simulation.Mobs.Values.Where(m => m.IsAlive).Select(m => new + mobs = dungeon.Simulation.Mobs.Values.Select(m => new { + id = m.Id.ToString(), name = m.Name, x = m.X, y = m.Y, + health = m.Health, + maxHealth = m.MaxHealth, alive = m.IsAlive, - isBoss = m.Type == DataServer.Data.Enums.MobType.Boss + isBoss = m.Type == DataServer.Data.Enums.MobType.Boss, + type = m.Type.ToString(), + state = m.State.ToString() ?? "Idle", + definitionId = m.DefinitionId }) }); } + public IActionResult OnPostKillMob(Guid id, string mobId) + { + var dungeon = _dungeonHandler.GetDungeon(id); + if (dungeon == null) + return new JsonResult(new { error = "Dungeon not found" }) { StatusCode = 404 }; + + if (!int.TryParse(mobId, out var mobInt)) + return new JsonResult(new { error = "Invalid mob ID" }) { StatusCode = 400 }; + + if (dungeon.Simulation.Mobs.TryGetValue(mobInt, out var mob)) + { + mob.Health = 0; + mob.IsAlive = false; + return new JsonResult(new { success = true }); + } + + return new JsonResult(new { error = "Mob not found" }) { StatusCode = 404 }; + } + + public async Task OnPostSpawnMob(Guid id, int mobDefId, float x, float y) + { + var dungeon = _dungeonHandler.GetDungeon(id); + if (dungeon == null) + return new JsonResult(new { error = "Dungeon not found" }) { StatusCode = 404 }; + + var mobDef = await _db.DungeonMobDefinitions.FindAsync(mobDefId); + if (mobDef == null) + return new JsonResult(new { error = "Mob definition not found" }) { StatusCode = 404 }; + int mobId = dungeon.Simulation.Mobs.Count + 1; + var stats = mobDef.GetStatsForBracket(dungeon.LevelBracketMin); + // Create a new mob instance + var mob = new MobInstance + { + Id = mobId, + DefinitionId = mobDef.Id, + Name = mobDef.Name, + Type = mobDef.Type, + X = x, + Y = y, + Health = stats.MaxHealth, + MaxHealth = stats.MaxHealth, + Mana = mobDef.BaseMana, + MaxMana = mobDef.BaseMana, + Stats = stats, + State = MobState.Idle, + SpriteConfigJson = mobDef.SpriteConfigJson, + TintColor = mobDef.TintColor, + Scale = mobDef.Scale, + Behavior = mobDef.Behavior, + PreferredRange = mobDef.PreferredRange, + FleeThreshold = mobDef.FleeThreshold, + Phases = mobDef.Phases, + CurrentAnimation = "idle_down", + FacingDirection = "down" + }; + + dungeon.Simulation.Mobs[mob.Id] = mob; + + return new JsonResult(new { success = true, mobId = mob.Id }); + } + public IActionResult OnPostKillAllMobs(Guid id) { var dungeon = _dungeonHandler.GetDungeon(id); diff --git a/Services/Admin/Pages/Index.cshtml.cs b/Services/Admin/Pages/Index.cshtml.cs index f285d69..d4e42a4 100644 --- a/Services/Admin/Pages/Index.cshtml.cs +++ b/Services/Admin/Pages/Index.cshtml.cs @@ -1,7 +1,7 @@ using Microsoft.EntityFrameworkCore; using DataServer.Data; -namespace Server.Services.Admin.Pages; +namespace GameServices.Admin.Pages; public class IndexModel : AdminPageModel { diff --git a/Services/Admin/Pages/Items/Edit.cshtml.cs b/Services/Admin/Pages/Items/Edit.cshtml.cs index 44f6d4b..63b618a 100644 --- a/Services/Admin/Pages/Items/Edit.cshtml.cs +++ b/Services/Admin/Pages/Items/Edit.cshtml.cs @@ -5,7 +5,7 @@ using DataServer.Data.Entities; using DataServer.Data.Enums; using System.Text.Json; -namespace Server.Services.Admin.Pages.Items; +namespace GameServices.Admin.Pages.Items; public class EditModel : AdminPageModel { diff --git a/Services/Admin/Pages/Items/Index.cshtml.cs b/Services/Admin/Pages/Items/Index.cshtml.cs index e25308b..5bb7c52 100644 --- a/Services/Admin/Pages/Items/Index.cshtml.cs +++ b/Services/Admin/Pages/Items/Index.cshtml.cs @@ -4,7 +4,7 @@ using DataServer.Data; using DataServer.Data.Entities; using DataServer.Data.Enums; -namespace Server.Services.Admin.Pages.Items; +namespace GameServices.Admin.Pages.Items; public class IndexModel : AdminPageModel { diff --git a/Services/Admin/Pages/Login.cshtml.cs b/Services/Admin/Pages/Login.cshtml.cs index e24163b..a278ec5 100644 --- a/Services/Admin/Pages/Login.cshtml.cs +++ b/Services/Admin/Pages/Login.cshtml.cs @@ -2,9 +2,9 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.EntityFrameworkCore; using DataServer.Data; -using Server.Services.Auth; +using GameServices.Auth; -namespace Server.Services.Admin.Pages; +namespace GameServices.Admin.Pages; public class LoginModel : PageModel { diff --git a/Services/Admin/Pages/Logout.cshtml.cs b/Services/Admin/Pages/Logout.cshtml.cs index 95b0d3e..17c1c83 100644 --- a/Services/Admin/Pages/Logout.cshtml.cs +++ b/Services/Admin/Pages/Logout.cshtml.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace Server.Services.Admin.Pages; +namespace GameServices.Admin.Pages; public class LogoutModel : PageModel { diff --git a/Services/Admin/Pages/LootTables/Edit.cshtml.cs b/Services/Admin/Pages/LootTables/Edit.cshtml.cs index 934b4f3..44903a2 100644 --- a/Services/Admin/Pages/LootTables/Edit.cshtml.cs +++ b/Services/Admin/Pages/LootTables/Edit.cshtml.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using DataServer.Data; using DataServer.Data.Entities; -namespace Server.Services.Admin.Pages.LootTables; +namespace GameServices.Admin.Pages.LootTables; public class EditModel : AdminPageModel { diff --git a/Services/Admin/Pages/LootTables/Index.cshtml.cs b/Services/Admin/Pages/LootTables/Index.cshtml.cs index 813ec51..5000c38 100644 --- a/Services/Admin/Pages/LootTables/Index.cshtml.cs +++ b/Services/Admin/Pages/LootTables/Index.cshtml.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using DataServer.Data; using DataServer.Data.Entities; -namespace Server.Services.Admin.Pages.LootTables; +namespace GameServices.Admin.Pages.LootTables; public class IndexModel : AdminPageModel { diff --git a/Services/Admin/Pages/Mobs/Edit.cshtml.cs b/Services/Admin/Pages/Mobs/Edit.cshtml.cs index 85fd4d7..b31f98d 100644 --- a/Services/Admin/Pages/Mobs/Edit.cshtml.cs +++ b/Services/Admin/Pages/Mobs/Edit.cshtml.cs @@ -5,7 +5,7 @@ using DataServer.Data.Entities; using DataServer.Data.Enums; using System.Text.Json; -namespace Server.Services.Admin.Pages.Mobs; +namespace GameServices.Admin.Pages.Mobs; // Helper class for sprite configuration (legacy - keeping for backwards compatibility) public class MobSpriteConfig diff --git a/Services/Admin/Pages/Mobs/Index.cshtml.cs b/Services/Admin/Pages/Mobs/Index.cshtml.cs index 06d5dc7..115168b 100644 --- a/Services/Admin/Pages/Mobs/Index.cshtml.cs +++ b/Services/Admin/Pages/Mobs/Index.cshtml.cs @@ -4,7 +4,7 @@ using DataServer.Data; using DataServer.Data.Entities; using DataServer.Data.Enums; -namespace Server.Services.Admin.Pages.Mobs; +namespace GameServices.Admin.Pages.Mobs; public class IndexModel : AdminPageModel { diff --git a/Services/Admin/Pages/Players/Character.cshtml.cs b/Services/Admin/Pages/Players/Character.cshtml.cs index 7cb285b..4739161 100644 --- a/Services/Admin/Pages/Players/Character.cshtml.cs +++ b/Services/Admin/Pages/Players/Character.cshtml.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using DataServer.Data; using DataServer.Data.Entities; -namespace Server.Services.Admin.Pages.Players; +namespace GameServices.Admin.Pages.Players; public class CharacterModel : AdminPageModel { diff --git a/Services/Admin/Pages/Players/Edit.cshtml.cs b/Services/Admin/Pages/Players/Edit.cshtml.cs index 4b09984..737c72b 100644 --- a/Services/Admin/Pages/Players/Edit.cshtml.cs +++ b/Services/Admin/Pages/Players/Edit.cshtml.cs @@ -2,10 +2,10 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using DataServer.Data; using DataServer.Data.Entities; -using Server.Services.Auth; +using GameServices.Auth; using Server.Redis; -namespace Server.Services.Admin.Pages.Players; +namespace GameServices.Admin.Pages.Players; public class EditModel : AdminPageModel { diff --git a/Services/Admin/Pages/Players/Index.cshtml.cs b/Services/Admin/Pages/Players/Index.cshtml.cs index 681cfb1..978b0b6 100644 --- a/Services/Admin/Pages/Players/Index.cshtml.cs +++ b/Services/Admin/Pages/Players/Index.cshtml.cs @@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using DataServer.Data; -namespace Server.Services.Admin.Pages.Players; +namespace GameServices.Admin.Pages.Players; public class IndexModel : AdminPageModel { diff --git a/Services/Admin/Pages/Recipes/Edit.cshtml.cs b/Services/Admin/Pages/Recipes/Edit.cshtml.cs index 969546b..4a5ff4d 100644 --- a/Services/Admin/Pages/Recipes/Edit.cshtml.cs +++ b/Services/Admin/Pages/Recipes/Edit.cshtml.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using DataServer.Data; using DataServer.Data.Entities; -namespace Server.Services.Admin.Pages.Recipes; +namespace GameServices.Admin.Pages.Recipes; public class EditModel : AdminPageModel { diff --git a/Services/Admin/Pages/Recipes/Index.cshtml.cs b/Services/Admin/Pages/Recipes/Index.cshtml.cs index 819498b..04792c6 100644 --- a/Services/Admin/Pages/Recipes/Index.cshtml.cs +++ b/Services/Admin/Pages/Recipes/Index.cshtml.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using DataServer.Data; using DataServer.Data.Entities; -namespace Server.Services.Admin.Pages.Recipes; +namespace GameServices.Admin.Pages.Recipes; public class IndexModel : AdminPageModel { diff --git a/Services/Admin/Pages/Resistances/Index.cshtml.cs b/Services/Admin/Pages/Resistances/Index.cshtml.cs index 6da7c35..2cd70ad 100644 --- a/Services/Admin/Pages/Resistances/Index.cshtml.cs +++ b/Services/Admin/Pages/Resistances/Index.cshtml.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using DataServer.Data; using DataServer.Data.Entities; -namespace Server.Services.Admin.Pages.Resistances; +namespace GameServices.Admin.Pages.Resistances; public class IndexModel : AdminPageModel { diff --git a/Services/Admin/Pages/Server/Index.cshtml.cs b/Services/Admin/Pages/Server/Index.cshtml.cs index a5699b4..87e4b00 100644 --- a/Services/Admin/Pages/Server/Index.cshtml.cs +++ b/Services/Admin/Pages/Server/Index.cshtml.cs @@ -4,7 +4,7 @@ using DataServer.Data; using Server.Redis; using System.Text.Json; -namespace Server.Services.Admin.Pages.Server; +namespace GameServices.Admin.Pages.Server; public class IndexModel : AdminPageModel { diff --git a/Services/Admin/Pages/Shared/_Layout.cshtml b/Services/Admin/Pages/Shared/_Layout.cshtml index 36468bc..8d0767d 100644 --- a/Services/Admin/Pages/Shared/_Layout.cshtml +++ b/Services/Admin/Pages/Shared/_Layout.cshtml @@ -159,12 +159,6 @@ TileMaps - - - - - Room Templates - @@ -198,6 +192,13 @@

Management

+ + + + + Dungeons + + diff --git a/Services/Admin/Pages/SpriteSheets/Edit.cshtml.cs b/Services/Admin/Pages/SpriteSheets/Edit.cshtml.cs index ac6d57f..6db56fe 100644 --- a/Services/Admin/Pages/SpriteSheets/Edit.cshtml.cs +++ b/Services/Admin/Pages/SpriteSheets/Edit.cshtml.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using DataServer.Data; using DataServer.Data.Entities; -namespace Server.Services.Admin.Pages.SpriteSheets; +namespace GameServices.Admin.Pages.SpriteSheets; public class EditModel : AdminPageModel { diff --git a/Services/Admin/Pages/SpriteSheets/Index.cshtml.cs b/Services/Admin/Pages/SpriteSheets/Index.cshtml.cs index 7f04797..3756e75 100644 --- a/Services/Admin/Pages/SpriteSheets/Index.cshtml.cs +++ b/Services/Admin/Pages/SpriteSheets/Index.cshtml.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using DataServer.Data; using DataServer.Data.Entities; -namespace Server.Services.Admin.Pages.SpriteSheets; +namespace GameServices.Admin.Pages.SpriteSheets; public class IndexModel : AdminPageModel { diff --git a/Services/Admin/Pages/TileMaps/Edit.cshtml.cs b/Services/Admin/Pages/TileMaps/Edit.cshtml.cs index 8f6e3be..fb46748 100644 --- a/Services/Admin/Pages/TileMaps/Edit.cshtml.cs +++ b/Services/Admin/Pages/TileMaps/Edit.cshtml.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using DataServer.Data; using DataServer.Data.Entities; -namespace Server.Services.Admin.Pages.TileMaps; +namespace GameServices.Admin.Pages.TileMaps; public class EditModel : AdminPageModel { diff --git a/Services/Admin/Pages/TileMaps/Index.cshtml.cs b/Services/Admin/Pages/TileMaps/Index.cshtml.cs index caa3201..d1b9818 100644 --- a/Services/Admin/Pages/TileMaps/Index.cshtml.cs +++ b/Services/Admin/Pages/TileMaps/Index.cshtml.cs @@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore; using DataServer.Data; using DataServer.Data.Entities; -namespace Server.Services.Admin.Pages.TileMaps; +namespace GameServices.Admin.Pages.TileMaps; public class IndexModel : AdminPageModel { diff --git a/Services/Admin/Pages/_ViewImports.cshtml b/Services/Admin/Pages/_ViewImports.cshtml index 77322d3..0613bda 100644 --- a/Services/Admin/Pages/_ViewImports.cshtml +++ b/Services/Admin/Pages/_ViewImports.cshtml @@ -1,2 +1,2 @@ -@namespace Server.Services.Admin.Pages +@namespace GameServices.Admin.Pages @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/Services/Auth/AccountsRepository.cs b/Services/Auth/AccountsRepository.cs index b388eb1..969a2de 100644 --- a/Services/Auth/AccountsRepository.cs +++ b/Services/Auth/AccountsRepository.cs @@ -1,7 +1,7 @@ using Microsoft.EntityFrameworkCore; using DataServer.Data; -namespace Server.Services.Auth; +namespace GameServices.Auth; public sealed class AccountsRepository : IAccountsRepository { diff --git a/Services/Auth/AdminAuthService.cs b/Services/Auth/AdminAuthService.cs index 717a912..03319d6 100644 --- a/Services/Auth/AdminAuthService.cs +++ b/Services/Auth/AdminAuthService.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using DataServer.Data; -namespace Server.Services.Auth; +namespace GameServices.Auth; /// /// Service for validating admin authentication via session tokens diff --git a/Services/Auth/AuthHandler.cs b/Services/Auth/AuthHandler.cs index db7aff0..4b9ee1e 100644 --- a/Services/Auth/AuthHandler.cs +++ b/Services/Auth/AuthHandler.cs @@ -7,7 +7,7 @@ using Server.Networking; using Server.Networking.Handling; using Server.Networking.Messages; -namespace Server.Services.Auth; +namespace GameServices.Auth; public sealed class AuthHandler : IClientMessageHandler { diff --git a/Services/Auth/AuthService.cs b/Services/Auth/AuthService.cs index b23381b..fa0f5a6 100644 --- a/Services/Auth/AuthService.cs +++ b/Services/Auth/AuthService.cs @@ -5,7 +5,7 @@ using DataServer.Data; using Server.Redis; using StackExchange.Redis; -namespace Server.Services.Auth; +namespace GameServices.Auth; public interface IAuthService { diff --git a/Services/Auth/IAccountsRepository.cs b/Services/Auth/IAccountsRepository.cs index 3680379..2e67e3f 100644 --- a/Services/Auth/IAccountsRepository.cs +++ b/Services/Auth/IAccountsRepository.cs @@ -1,6 +1,6 @@ using DataServer.Data; -namespace Server.Services.Auth; +namespace GameServices.Auth; public interface IAccountsRepository { diff --git a/Services/Auth/IPasswordHasher.cs b/Services/Auth/IPasswordHasher.cs index 6cf755b..52353a0 100644 --- a/Services/Auth/IPasswordHasher.cs +++ b/Services/Auth/IPasswordHasher.cs @@ -1,4 +1,4 @@ -namespace Server.Services.Auth; +namespace GameServices.Auth; public interface IPasswordHasher { diff --git a/Services/Auth/ISessionAudit.cs b/Services/Auth/ISessionAudit.cs index d894c41..e4491fb 100644 --- a/Services/Auth/ISessionAudit.cs +++ b/Services/Auth/ISessionAudit.cs @@ -1,7 +1,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Server.Services.Auth; +namespace GameServices.Auth; public interface ISessionAudit { diff --git a/Services/Auth/ISessionRegistry.cs b/Services/Auth/ISessionRegistry.cs index a60169b..a9137fc 100644 --- a/Services/Auth/ISessionRegistry.cs +++ b/Services/Auth/ISessionRegistry.cs @@ -1,7 +1,7 @@ using System; using System.Threading.Tasks; -namespace Server.Services.Auth; +namespace GameServices.Auth; public interface ISessionRegistry { diff --git a/Services/Auth/Pbkdf2PasswordHasher.cs b/Services/Auth/Pbkdf2PasswordHasher.cs index 9c23bde..a070483 100644 --- a/Services/Auth/Pbkdf2PasswordHasher.cs +++ b/Services/Auth/Pbkdf2PasswordHasher.cs @@ -1,6 +1,6 @@ using System.Security.Cryptography; -namespace Server.Services.Auth; +namespace GameServices.Auth; public sealed class Pbkdf2PasswordHasher : IPasswordHasher { diff --git a/Services/Auth/SessionAudit.cs b/Services/Auth/SessionAudit.cs index 8a30ad0..db25c14 100644 --- a/Services/Auth/SessionAudit.cs +++ b/Services/Auth/SessionAudit.cs @@ -8,7 +8,7 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Logging; using DataServer.Data; -namespace Server.Services.Auth; +namespace GameServices.Auth; public sealed class SessionAudit : ISessionAudit { diff --git a/Services/Auth/SessionRegistry.cs b/Services/Auth/SessionRegistry.cs index d49f710..0e8c2c8 100644 --- a/Services/Auth/SessionRegistry.cs +++ b/Services/Auth/SessionRegistry.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Concurrent; -namespace Server.Services.Auth; +namespace GameServices.Auth; public sealed class SessionRegistry : ISessionRegistry { diff --git a/Services/CdnBrowserService.cs b/Services/CdnBrowserService.cs index fb51b17..1f0fd99 100644 --- a/Services/CdnBrowserService.cs +++ b/Services/CdnBrowserService.cs @@ -1,7 +1,7 @@ using Minio; using Minio.DataModel.Args; -namespace Server.Services; +namespace GameServices; public class MinioConfig { diff --git a/Services/ServerBroadcastService.cs b/Services/ServerBroadcastService.cs index f09744c..9b7228b 100644 --- a/Services/ServerBroadcastService.cs +++ b/Services/ServerBroadcastService.cs @@ -1,6 +1,6 @@ using System.Collections.Concurrent; -namespace Server.Services; +namespace GameServices; /// /// Service for broadcasting messages to connected game clients