feat: update relief rendering logic and version to 1.114.0

This commit is contained in:
Azgaar 2026-03-11 00:11:15 +01:00
parent dc06f3d65c
commit ab7baf83fd
6 changed files with 53 additions and 110 deletions

View file

@ -1112,4 +1112,23 @@ export function resolveVersionConflicts(mapVersion) {
zone.cells = unique(zone.cells);
});
}
if (isOlderThan("1.114.0")) {
// v1.114.0 add reliefIcon to pack data and changed rendering method to WebGL
const terrainEl = byId("terrain");
if (!terrainEl) return;
const relief = [];
terrainEl.querySelectorAll("use").forEach(u => {
const href = u.getAttribute("href") || u.getAttribute("xlink:href") || "";
if (!href) return;
const x = +u.getAttribute("x");
const y = +u.getAttribute("y");
const s = +u.getAttribute("width");
relief.push({i: relief.length, href, x, y, s});
});
terrainEl.innerHTML = "";
pack.relief = relief;
if (layerIsOn("toggleRelief")) drawRelief();
}
}