@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('/')}"; } } }
@if (!string.IsNullOrEmpty(Model.Message)) {Grid: @Model.Sheet.Columns × @Model.Sheet.Rows = @Model.Sheet.TotalTiles tiles
URL: @imageUrl
} else {Use Tile Definitions below to set walkability, buckets, and other gameplay properties per frame.
Click any frame to create or edit its Tile Definition.
Define gameplay properties and buckets per frame.
| 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. | ||||