mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-02-04 17:41:23 +01:00
refactor: migrate cultures generator
This commit is contained in:
parent
e37fce1eed
commit
492b4b27e6
6 changed files with 1424 additions and 625 deletions
|
|
@ -8495,7 +8495,6 @@
|
|||
<script defer src="config/precreated-heightmaps.js"></script>
|
||||
<script defer src="modules/ice.js?v=1.111.0"></script>
|
||||
<script defer src="modules/names-generator.js?v=1.106.0"></script>
|
||||
<script defer src="modules/cultures-generator.js?v=1.106.0"></script>
|
||||
<script defer src="modules/burgs-generator.js?v=1.109.5"></script>
|
||||
<script defer src="modules/states-generator.js?v=1.107.0"></script>
|
||||
<script defer src="modules/provinces-generator.js?v=1.106.0"></script>
|
||||
|
|
|
|||
1405
src/modules/cultures-generator.ts
Normal file
1405
src/modules/cultures-generator.ts
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -4,4 +4,5 @@ import "./features";
|
|||
import "./lakes";
|
||||
import "./ocean-layers";
|
||||
import "./river-generator";
|
||||
import "./biomes"
|
||||
import "./biomes";
|
||||
import "./cultures-generator";
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import type { Culture } from "../modules/cultures-generator";
|
||||
import type { PackedGraphFeature } from "../modules/features";
|
||||
import type { River } from "../modules/river-generator";
|
||||
|
||||
|
|
@ -13,15 +14,18 @@ export interface PackedGraph {
|
|||
b: boolean[]; // cell is on border
|
||||
h: TypedArray; // cell heights
|
||||
t: TypedArray; // cell terrain types
|
||||
r: Uint16Array; // river id passing through cell
|
||||
f: Uint16Array; // feature id occupying cell
|
||||
r: TypedArray; // river id passing through cell
|
||||
f: TypedArray; // feature id occupying cell
|
||||
fl: TypedArray; // flux presence in cell
|
||||
s: TypedArray; // cell suitability
|
||||
pop: TypedArray; // cell population
|
||||
conf: TypedArray; // cell water confidence
|
||||
haven: TypedArray; // cell is a haven
|
||||
g: number[]; // cell ground type
|
||||
culture: number[]; // cell culture id
|
||||
biome: TypedArray; // cell biome id
|
||||
harbor: TypedArray; // cell harbour presence
|
||||
area: TypedArray; // cell area
|
||||
};
|
||||
vertices: {
|
||||
i: number[]; // vertex indices
|
||||
|
|
@ -33,4 +37,5 @@ export interface PackedGraph {
|
|||
};
|
||||
rivers: River[];
|
||||
features: PackedGraphFeature[];
|
||||
}
|
||||
cultures: Culture[];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,9 +14,14 @@ declare global {
|
|||
|
||||
var heightmapTemplates: any;
|
||||
var Names: any;
|
||||
|
||||
var nameBases: any;
|
||||
var pointsInput: HTMLInputElement;
|
||||
var culturesInput: HTMLInputElement;
|
||||
var culturesSet: HTMLSelectElement;
|
||||
var heightExponentInput: HTMLInputElement;
|
||||
var alertMessage: HTMLElement;
|
||||
|
||||
var $: (selector: any) => any;
|
||||
|
||||
var rivers: Selection<SVGElement, unknown, null, undefined>;
|
||||
var oceanLayers: Selection<SVGGElement, unknown, null, undefined>;
|
||||
|
|
@ -30,4 +35,6 @@ declare global {
|
|||
icons: string[][];
|
||||
cost: number[];
|
||||
};
|
||||
}
|
||||
var COA: any;
|
||||
var FlatQueue: any;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue