mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 02:21:24 +01:00
refactor: generation script
This commit is contained in:
parent
c0f6ce00ef
commit
87d8c1024d
31 changed files with 364 additions and 324 deletions
|
|
@ -224,10 +224,10 @@ export function open(options) {
|
|||
calculateTemperatures(grid);
|
||||
generatePrecipitation(grid);
|
||||
reGraph(grid);
|
||||
reMarkFeatures();
|
||||
drawCoastline();
|
||||
reMarkFeatures(pack, newGrid);
|
||||
drawCoastline(pack);
|
||||
|
||||
Rivers.generate(erosionAllowed);
|
||||
Rivers.generate(pack, grid, erosionAllowed);
|
||||
|
||||
if (!erosionAllowed) {
|
||||
for (const i of pack.cells.i) {
|
||||
|
|
@ -237,7 +237,7 @@ export function open(options) {
|
|||
}
|
||||
}
|
||||
|
||||
renderLayer("rivers");
|
||||
renderLayer("rivers", pack);
|
||||
Lakes.defineGroup();
|
||||
Biomes.define();
|
||||
rankCells();
|
||||
|
|
@ -344,9 +344,9 @@ export function open(options) {
|
|||
calculateTemperatures(grid);
|
||||
generatePrecipitation(grid);
|
||||
reGraph(grid);
|
||||
drawCoastline();
|
||||
drawCoastline(pack);
|
||||
|
||||
if (erosionAllowed) Rivers.generate(true);
|
||||
if (erosionAllowed) Rivers.generate(pack, grid, true);
|
||||
|
||||
// assign saved pack data from grid back to pack
|
||||
const n = pack.cells.i.length;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import * as d3 from "d3";
|
|||
|
||||
import {heightmapTemplates} from "config/heightmap-templates";
|
||||
import {precreatedHeightmaps} from "config/precreated-heightmaps";
|
||||
import {generateGrid} from "utils/graphUtils";
|
||||
import {generateGrid} from "scripts/generation/graph";
|
||||
import {shouldRegenerateGridPoints} from "scripts/generation/generation";
|
||||
import {byId} from "utils/shorthands";
|
||||
import {generateSeed} from "utils/probabilityUtils";
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ const dialogsMap = {
|
|||
lakeEditor: "lake-editor",
|
||||
religionsEditor: "religions-editor",
|
||||
statesEditor: "states-editor",
|
||||
unitsEditor: "units-editor"
|
||||
unitsEditor: "units-editor",
|
||||
worldConfigurator: "world-configurator"
|
||||
};
|
||||
|
||||
type TDialog = keyof typeof dialogsMap;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue