mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
refactor(generation): cultures start
This commit is contained in:
parent
1a57a8ac08
commit
fe20f66b96
15 changed files with 621 additions and 581 deletions
|
|
@ -12,7 +12,7 @@ import {rn} from "utils/numberUtils";
|
|||
import {generateRivers} from "./rivers";
|
||||
|
||||
const {LAND_COAST, WATER_COAST, DEEPER_WATER} = DISTANCE_FIELD;
|
||||
const {Biomes} = window;
|
||||
const {Biomes, Cultures} = window;
|
||||
|
||||
export function createPack(grid: IGrid): IPack {
|
||||
const {temp, prec} = grid.cells;
|
||||
|
|
@ -61,7 +61,11 @@ export function createPack(grid: IGrid): IPack {
|
|||
harbor
|
||||
});
|
||||
|
||||
// Cultures.generate();
|
||||
const {cultureIds, cultures}: {cultureIds: Uint16Array; cultures: ICulture[]} = Cultures.generate({
|
||||
features: mergedFeatures,
|
||||
cells: {...cells, pop: population}
|
||||
});
|
||||
|
||||
// Cultures.expand();
|
||||
// BurgsAndStates.generate();
|
||||
// Religions.generate();
|
||||
|
|
@ -99,11 +103,13 @@ export function createPack(grid: IGrid): IPack {
|
|||
conf,
|
||||
biome,
|
||||
s: suitability,
|
||||
pop: population
|
||||
// state, culture, religion, province, burg
|
||||
pop: population,
|
||||
culture: cultureIds
|
||||
// state, religion, province, burg
|
||||
},
|
||||
features: mergedFeatures,
|
||||
rivers: rawRivers // "name" | "basin" | "type"
|
||||
rivers: rawRivers, // "name" | "basin" | "type"
|
||||
cultures
|
||||
};
|
||||
|
||||
return pack;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue