mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 20:11:24 +01:00
zoneTypes dialog
add and delete types, dialog
This commit is contained in:
parent
b1f3e5035d
commit
7873f8fb80
3 changed files with 125 additions and 17 deletions
8
main.js
8
main.js
|
|
@ -122,6 +122,7 @@ let customization = 0;
|
|||
|
||||
let biomesData = applyDefaultBiomesSystem();
|
||||
let nameBases = Names.getNameBases(); // cultures-related data
|
||||
const zoneTypes = ["Invasion", "Rebels", "Proselytism", "Crusade", "Disease", "Disaster"];
|
||||
|
||||
let color = d3.scaleSequential(d3.interpolateSpectral); // default color scheme
|
||||
const lineGen = d3.line().curve(d3.curveBasis); // d3 line generator with default curve interpolation
|
||||
|
|
@ -1847,6 +1848,13 @@ function addZones(number = 1) {
|
|||
TIME && console.timeEnd("addZones");
|
||||
}
|
||||
|
||||
// Update zone types
|
||||
function updateZoneType(zone, newType) {
|
||||
if (zone) {
|
||||
zone.dataset.type = newType;
|
||||
}
|
||||
}
|
||||
|
||||
// show map stats on generation complete
|
||||
function showStatistics() {
|
||||
const template = templateInput.options[templateInput.selectedIndex].text;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue