@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) {
💡

Create Tile Templates

To use tiles from this sheet, create Tile Templates which define walkability, sockets, and other properties.

} @section Scripts { }