From 14c50f0aaed7de1f5f00021033e53e4909756be8 Mon Sep 17 00:00:00 2001 From: dingo Date: Sun, 11 Jan 2026 08:21:50 -0500 Subject: [PATCH] Dungeon Viewer changes --- Game/Dungeon/DungeonGeneratorV3.cs | 4 +- Services/Admin/Pages/Dungeons/View.cshtml | 533 +++++++++---------- Services/Admin/Pages/Dungeons/View.cshtml.cs | 23 +- 3 files changed, 268 insertions(+), 292 deletions(-) diff --git a/Game/Dungeon/DungeonGeneratorV3.cs b/Game/Dungeon/DungeonGeneratorV3.cs index 6059a7b..646b8f1 100644 --- a/Game/Dungeon/DungeonGeneratorV3.cs +++ b/Game/Dungeon/DungeonGeneratorV3.cs @@ -19,12 +19,12 @@ public class DungeonGeneratorV3 /// Enable verbose logging to trace tile selection decisions. /// Set to true to debug tile/template selection issues. /// - public static bool VerboseLogging { get; set; } = true; + public static bool VerboseLogging { get; set; } = false; /// /// Log every single tile placement (WARNING: extremely verbose for large dungeons) /// - public static bool LogEveryTile { get; set; } = true; + public static bool LogEveryTile { get; set; } = false; /// /// Enable socket-based tile matching. When true, tiles are selected based on diff --git a/Services/Admin/Pages/Dungeons/View.cshtml b/Services/Admin/Pages/Dungeons/View.cshtml index 168c5e3..d9e5b55 100644 --- a/Services/Admin/Pages/Dungeons/View.cshtml +++ b/Services/Admin/Pages/Dungeons/View.cshtml @@ -21,31 +21,28 @@ .stat-card { background: rgba(30, 30, 50, 0.8); border: 1px solid #374151; border-radius: 8px; padding: 12px; } .inspector { background: rgba(20, 20, 40, 0.95); border: 1px solid #4f46e5; border-radius: 8px; padding: 16px; } .inspector-stat { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.1); } - .tool-btn { padding: 6px 10px; border-radius: 6px; font-size: 12px; transition: all 0.15s; } + .tool-btn { padding: 6px 10px; border-radius: 6px; font-size: 12px; transition: all 0.15s; background: #374151; color: #ccc; border: none; cursor: pointer; } + .tool-btn:hover { background: #4b5563; } .tool-btn.active { background: #4f46e5; color: white; } - .zoom-controls { display: flex; align-items: center; gap: 8px; } .zoom-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; } - /* Tile picker modal */ - .tile-picker-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8); z-index: 1000; display: flex; align-items: center; justify-content: center; } - .tile-picker-content { background: #1a1a2e; border: 2px solid #4f46e5; border-radius: 12px; max-width: 90vw; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; } - .tile-picker-header { padding: 16px; border-bottom: 1px solid #374151; display: flex; justify-content: space-between; align-items: center; } - .tile-picker-body { display: flex; flex: 1; overflow: hidden; } - .tile-picker-sheets { width: 200px; border-right: 1px solid #374151; overflow-y: auto; padding: 8px; } - .tile-picker-grid { flex: 1; overflow: auto; padding: 16px; } - .sheet-item { padding: 8px; border-radius: 6px; cursor: pointer; margin-bottom: 4px; } - .sheet-item:hover, .sheet-item.selected { background: #374151; } - .tile-grid { display: grid; gap: 2px; } - .tile-cell { border: 1px solid transparent; cursor: pointer; image-rendering: pixelated; } + /* Tile Drawer */ + .tile-drawer { position: fixed; top: 0; right: -320px; width: 320px; height: 100vh; background: #1a1a2e; border-left: 2px solid #4f46e5; z-index: 1000; transition: right 0.3s ease; display: flex; flex-direction: column; } + .tile-drawer.open { right: 0; } + .tile-drawer-header { padding: 16px; border-bottom: 1px solid #374151; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; } + .tile-drawer-body { flex: 1; overflow-y: auto; padding: 12px; } + .sheet-section { margin-bottom: 16px; } + .sheet-header { padding: 8px; background: #252540; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; } + .sheet-header:hover { background: #303050; } + .sheet-header.expanded { background: #4f46e5; } + .tile-grid { display: grid; gap: 2px; padding: 4px; background: #0a0a15; border-radius: 4px; } + .tile-cell { border: 2px solid transparent; cursor: pointer; image-rendering: pixelated; background: #1a1a2e; } .tile-cell:hover { border-color: #4f46e5; } - .tile-cell.selected { border-color: #22c55e; border-width: 2px; } - .tile-preview { width: 64px; height: 64px; border: 2px solid #374151; margin: 8px auto; image-rendering: pixelated; background: #000; } - - /* Template picker */ - .template-list { max-height: 300px; overflow-y: auto; } - .template-item { padding: 8px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; gap: 8px; } - .template-item:hover { background: #374151; } - .template-item.selected { background: #4f46e5; } + .tile-cell.selected { border-color: #22c55e; } + .tile-preview-box { display: flex; align-items: center; gap: 12px; padding: 12px; background: #252540; border-radius: 8px; margin-bottom: 12px; } + .tile-preview-canvas { width: 48px; height: 48px; border: 2px solid #374151; image-rendering: pixelated; background: #000; } + .drawer-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 999; display: none; } + .drawer-overlay.open { display: block; }
@@ -69,16 +66,15 @@ else

Live Dungeon Map

- -
- +
+ 100% - - + +
- +
@@ -90,30 +86,26 @@ else - - Click/drag on map +
- - - + -
-

Dungeon Info

-
ID@Model.Dungeon.Id.ToString()[..12]...
Tier@Model.Dungeon.Tier
-
Bracket@Model.Dungeon.LevelBracketMin-@Model.Dungeon.LevelBracketMax
Size@Model.MapWidth × @Model.MapHeight
-
Tiles@Model.VisualTileCount placed
+
Tiles@Model.VisualTileCount
+
Sheets0
Duration@Model.Duration
-

Live Stats

@@ -191,7 +179,6 @@ else
-

Spawn Mob

@@ -207,46 +194,44 @@ else
+

Right-click map to set position

-

Actions

@Html.AntiForgeryToken() - +
-
- @Html.AntiForgeryToken() - - -
- +
- -