@page "/admin/tilemaps/edit" @model TileMaps.EditModel @using DataServer.Data.Entities @{ ViewData["Title"] = Model.Sheet.Id == 0 ? "New TileMap Sheet" : $"Edit: {Model.Sheet.Name}"; // Build image URL - handle both with and without /downloads/ path var imageUrl = Model.Sheet.CdnPath; if (!string.IsNullOrEmpty(imageUrl)) { if (!imageUrl.StartsWith("http")) { // Ensure proper CDN URL construction var baseUrl = Model.CdnBaseUrl.TrimEnd('/'); if (!baseUrl.EndsWith("/downloads")) { baseUrl += "/downloads"; } imageUrl = $"{baseUrl}/{imageUrl.TrimStart('/')}"; } } }
← Back to TileMap Sheets
@if (!string.IsNullOrEmpty(Model.Message)) {
@Model.Message
}

TileMap Sheet Settings

@Html.AntiForgeryToken()

Preview

@if (!string.IsNullOrEmpty(Model.Sheet.CdnPath)) {
@Model.Sheet.Name

Grid: @Model.Sheet.Columns × @Model.Sheet.Rows = @Model.Sheet.TotalTiles tiles

URL: @imageUrl

} else {
Select a CDN path to preview the tilemap
}
@if (Model.Sheet.Id > 0) {
💡

Define Tile Properties

Use Tile Definitions below to set walkability, buckets, and other gameplay properties per frame.

} @if (Model.Sheet.Id > 0) {

Define Tiles (Full Sheet)

Click any frame to create or edit its Tile Definition.

Green border = defined. Red border = not defined.

Tile Definitions

Define gameplay properties and buckets per frame.

@foreach (var row in Model.TileDefinitionRows) { } @if (!Model.TileDefinitionRows.Any()) { }
Frame Name Type Buckets Actions
@row.FrameIndex @(!string.IsNullOrWhiteSpace(row.Name) ? row.Name : "-") @row.Type @row.BucketCount Edit
No tile definitions yet. Use "Edit Frame" to create one.
} @section Scripts { }