209 lines
8.7 KiB
Plaintext
209 lines
8.7 KiB
Plaintext
@page "/admin/dungeonbuilder"
|
|
@model DungeonBuilder.IndexModel
|
|
@{
|
|
ViewData["Title"] = "Dungeon Builder";
|
|
}
|
|
|
|
<div class="mb-6">
|
|
<h1 class="text-2xl font-bold text-white">Dungeon Builder</h1>
|
|
<p class="text-gray-400 mt-1">Visual tools for creating dungeon content</p>
|
|
</div>
|
|
|
|
@if (!string.IsNullOrEmpty(Model.Message))
|
|
{
|
|
<div class="mb-4 p-3 rounded @(Model.IsError ? "bg-red-900/50 text-red-300" : "bg-green-900/50 text-green-300")">
|
|
@Model.Message
|
|
</div>
|
|
}
|
|
|
|
<!-- Quick Stats -->
|
|
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-6">
|
|
<div class="card p-4">
|
|
<div class="text-3xl font-bold text-blue-400">@Model.TileTemplateCount</div>
|
|
<div class="text-gray-400 text-sm">Tile Templates</div>
|
|
</div>
|
|
<div class="card p-4">
|
|
<div class="text-3xl font-bold text-purple-400">@Model.ObjectTemplateCount</div>
|
|
<div class="text-gray-400 text-sm">Object Templates</div>
|
|
</div>
|
|
<div class="card p-4">
|
|
<div class="text-3xl font-bold text-green-400">@Model.RoomTemplateCount</div>
|
|
<div class="text-gray-400 text-sm">Room Templates</div>
|
|
</div>
|
|
<div class="card p-4">
|
|
<div class="text-3xl font-bold text-yellow-400">@Model.PaletteCount</div>
|
|
<div class="text-gray-400 text-sm">Dungeon Palettes</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Builder Tools Grid -->
|
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
|
|
<!-- Tile Templates -->
|
|
<a href="/admin/dungeonbuilder/tiles" class="card p-6 hover:border-blue-500 transition-colors group">
|
|
<div class="flex items-start gap-4">
|
|
<div class="w-12 h-12 rounded-lg bg-blue-500/20 flex items-center justify-center text-blue-400 text-2xl">
|
|
🧱
|
|
</div>
|
|
<div class="flex-1">
|
|
<h3 class="text-lg font-semibold text-white group-hover:text-blue-400">Tile Templates</h3>
|
|
<p class="text-gray-400 text-sm mt-1">Create reusable floor, wall, and door patterns</p>
|
|
<div class="mt-3 text-xs text-gray-500">
|
|
• Single tiles or multi-tile patterns<br>
|
|
• Socket configuration for matching<br>
|
|
• Walkability and blocking settings
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
|
|
<!-- Object Templates -->
|
|
<a href="/admin/dungeonbuilder/objects" class="card p-6 hover:border-purple-500 transition-colors group">
|
|
<div class="flex items-start gap-4">
|
|
<div class="w-12 h-12 rounded-lg bg-purple-500/20 flex items-center justify-center text-purple-400 text-2xl">
|
|
🏺
|
|
</div>
|
|
<div class="flex-1">
|
|
<h3 class="text-lg font-semibold text-white group-hover:text-purple-400">Object Templates</h3>
|
|
<p class="text-gray-400 text-sm mt-1">Design furniture, containers, traps, and decorations</p>
|
|
<div class="mt-3 text-xs text-gray-500">
|
|
• Animation states<br>
|
|
• Interaction settings<br>
|
|
• Loot and rewards
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
|
|
<!-- Room Templates -->
|
|
<a href="/admin/dungeonbuilder/rooms" class="card p-6 hover:border-green-500 transition-colors group">
|
|
<div class="flex items-start gap-4">
|
|
<div class="w-12 h-12 rounded-lg bg-green-500/20 flex items-center justify-center text-green-400 text-2xl">
|
|
🗺️
|
|
</div>
|
|
<div class="flex-1">
|
|
<h3 class="text-lg font-semibold text-white group-hover:text-green-400">Room Templates</h3>
|
|
<p class="text-gray-400 text-sm mt-1">Build complete rooms with tiles, objects, and spawns</p>
|
|
<div class="mt-3 text-xs text-gray-500">
|
|
• Visual room editor<br>
|
|
• Connection points<br>
|
|
• Mob and item spawns
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
|
|
<!-- Dungeon Palettes -->
|
|
<a href="/admin/dungeonbuilder/palettes" class="card p-6 hover:border-yellow-500 transition-colors group">
|
|
<div class="flex items-start gap-4">
|
|
<div class="w-12 h-12 rounded-lg bg-yellow-500/20 flex items-center justify-center text-yellow-400 text-2xl">
|
|
🎨
|
|
</div>
|
|
<div class="flex-1">
|
|
<h3 class="text-lg font-semibold text-white group-hover:text-yellow-400">Dungeon Palettes</h3>
|
|
<p class="text-gray-400 text-sm mt-1">Combine templates into themed dungeon sets</p>
|
|
<div class="mt-3 text-xs text-gray-500">
|
|
• Template collections<br>
|
|
• Generation parameters<br>
|
|
• Biome configuration
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
|
|
<!-- Sprite Sheet Manager -->
|
|
<a href="/admin/tilemaps" class="card p-6 hover:border-cyan-500 transition-colors group">
|
|
<div class="flex items-start gap-4">
|
|
<div class="w-12 h-12 rounded-lg bg-cyan-500/20 flex items-center justify-center text-cyan-400 text-2xl">
|
|
🖼️
|
|
</div>
|
|
<div class="flex-1">
|
|
<h3 class="text-lg font-semibold text-white group-hover:text-cyan-400">Sprite Sheets</h3>
|
|
<p class="text-gray-400 text-sm mt-1">Manage tilemap sprite sheets and tile definitions</p>
|
|
<div class="mt-3 text-xs text-gray-500">
|
|
• Upload sprite sheets<br>
|
|
• Tag individual tiles<br>
|
|
• Define tile properties
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
|
|
<!-- Test Generator -->
|
|
<a href="/admin/dungeonbuilder/testgen" class="card p-6 hover:border-orange-500 transition-colors group">
|
|
<div class="flex items-start gap-4">
|
|
<div class="w-12 h-12 rounded-lg bg-orange-500/20 flex items-center justify-center text-orange-400 text-2xl">
|
|
🧪
|
|
</div>
|
|
<div class="flex-1">
|
|
<h3 class="text-lg font-semibold text-white group-hover:text-orange-400">Test Generator</h3>
|
|
<p class="text-gray-400 text-sm mt-1">Preview dungeon generation with your templates</p>
|
|
<div class="mt-3 text-xs text-gray-500">
|
|
• Generate test dungeons<br>
|
|
• Visual preview<br>
|
|
• Adjust parameters
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
</div>
|
|
|
|
<!-- Recent Activity -->
|
|
<div class="card p-6 mt-6">
|
|
<h3 class="text-lg font-semibold text-white mb-4">Recent Templates</h3>
|
|
|
|
<div class="overflow-x-auto">
|
|
<table class="w-full text-sm">
|
|
<thead>
|
|
<tr class="text-left text-gray-400 border-b border-gray-700">
|
|
<th class="pb-2 pr-4">Type</th>
|
|
<th class="pb-2 pr-4">Name</th>
|
|
<th class="pb-2 pr-4">Biome</th>
|
|
<th class="pb-2 pr-4">Updated</th>
|
|
<th class="pb-2">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="divide-y divide-gray-700/50">
|
|
@foreach (var item in Model.RecentItems)
|
|
{
|
|
<tr class="hover:bg-gray-800/50">
|
|
<td class="py-2 pr-4">
|
|
<span class="px-2 py-0.5 rounded text-xs @GetTypeColor(item.Type)">
|
|
@item.Type
|
|
</span>
|
|
</td>
|
|
<td class="py-2 pr-4 text-white">@item.Name</td>
|
|
<td class="py-2 pr-4 text-gray-400">@(item.Biome ?? "-")</td>
|
|
<td class="py-2 pr-4 text-gray-500">@item.UpdatedAt.ToString("MMM d, HH:mm")</td>
|
|
<td class="py-2">
|
|
<a href="@item.EditUrl" class="text-blue-400 hover:text-blue-300">Edit</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
@if (!Model.RecentItems.Any())
|
|
{
|
|
<tr>
|
|
<td colspan="5" class="py-8 text-center text-gray-500">
|
|
No templates created yet. Start by creating a tile or object template!
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
@functions {
|
|
string GetTypeColor(string type)
|
|
{
|
|
return type switch
|
|
{
|
|
"Tile" => "bg-blue-500/20 text-blue-400",
|
|
"Object" => "bg-purple-500/20 text-purple-400",
|
|
"Room" => "bg-green-500/20 text-green-400",
|
|
"Palette" => "bg-yellow-500/20 text-yellow-400",
|
|
_ => "bg-gray-500/20 text-gray-400"
|
|
};
|
|
}
|
|
}
|