mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 02:21:24 +01:00
Sky burgs + air routes: layer, editor toggles, styling, altitude, icons, and generators
This commit is contained in:
parent
e94ec5b123
commit
c075e704fd
6 changed files with 45 additions and 12 deletions
|
|
@ -334,6 +334,7 @@ function editBurg(id) {
|
|||
}
|
||||
// Regenerate routes to reflect air network
|
||||
regenerateRoutes();
|
||||
if (layerIsOn("toggleBurgIcons")) drawBurgIcons();
|
||||
}
|
||||
else if (feature === "flying") {
|
||||
burg.flying = +turnOn;
|
||||
|
|
@ -348,6 +349,7 @@ function editBurg(id) {
|
|||
} catch (e) { ERROR && console.error(e); }
|
||||
}
|
||||
regenerateRoutes();
|
||||
if (layerIsOn("toggleBurgIcons")) drawBurgIcons();
|
||||
}
|
||||
else if (feature === "capital") toggleCapital(id);
|
||||
else burg[feature] = +turnOn;
|
||||
|
|
@ -541,11 +543,18 @@ function editBurg(id) {
|
|||
}
|
||||
burg.x = x;
|
||||
burg.y = y;
|
||||
if (burg.capital) pack.states[newState].center = burg.cell;
|
||||
|
||||
if (burg.capital) pack.states[burg.state].center = burg.cell;
|
||||
|
||||
if (d3.event.shiftKey === false) toggleRelocateBurg();
|
||||
}
|
||||
|
||||
function changeAltitude() {
|
||||
const id = +elSelected.attr("data-id");
|
||||
const burg = pack.burgs[id];
|
||||
burg.altitude = Math.max(0, Math.round(+byId("burgAltitude").value));
|
||||
if (burg.flying) byId("burgElevation").innerHTML = `${burg.altitude} m (sky altitude)`;
|
||||
}
|
||||
|
||||
function editBurgLegend() {
|
||||
const id = elSelected.attr("data-id");
|
||||
const name = elSelected.text();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue