mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
refactor(es modules): modulize utils
This commit is contained in:
parent
11df349394
commit
12e1c9f334
45 changed files with 620 additions and 283 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import {restoreDefaultEvents} from "/src/scripts/events";
|
||||
import {findCell} from "/src/utils/graphUtils";
|
||||
import {tip, clearMainTip} from "/src/scripts/tooltips";
|
||||
import {getCoordinates} from "@/utils/coordinateUtils";
|
||||
import {rn} from "/src/utils/numberUtils";
|
||||
|
||||
export function overviewBurgs() {
|
||||
|
|
@ -500,8 +501,9 @@ export function overviewBurgs() {
|
|||
data += rn(b.population * populationRate * urbanization) + ",";
|
||||
|
||||
// add geography data
|
||||
data += getLatitude(b.y, 2) + ",";
|
||||
data += getLongitude(b.x, 2) + ",";
|
||||
const [lon, lat] = getCoordinates(b.x, b.y, 2);
|
||||
data += lat + ",";
|
||||
data += lon + ",";
|
||||
data += parseInt(getHeight(pack.cells.h[b.cell])) + ",";
|
||||
|
||||
// add status data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue