Commit graph

290 commits

Author SHA1 Message Date
barrulus
c4663e7b9b fix: sky port behavior, default sky altitude, Sky Realm robustness, and unfly state restore
Summary

Ground burgs with sky ports keep land capabilities and land routes.
Only truly flying burgs join the Sky Realm; turning off “flying” restores the ground state.
Replace magic altitude 1000 with a DOM-configurable default.
Guard state hover/pin logic for geometry-less Sky Realm to prevent console errors.
Watabou link uses sky settings only for flying burgs.
Details

Land routing with sky ports:

Change: include sky ports in land road/trail networks; exclude only flying burgs.
Why: sky ports should not impose flying/land restrictions on a ground burg.
File: modules/routes-generator.js
Sky port toggle does not move state:

Change: toggling skyPort no longer assigns the burg’s state to the Sky Realm or reassigns cell ownership.
Why: sky port ≠ flying city; it’s just air connectivity.
File: modules/ui/burg-editor.js
Flying toggle and state restore:

Change: enabling “flying” assigns the burg to the Sky Realm but does not overwrite the cell’s ground state; disabling “flying” restores the burg’s state to the underlying ground state (pack.cells.state[burg.cell]).
Change: when relocating, assign Sky Realm only if the burg is placed over water; ground placements keep ground state.
Why: fixes bug where reverting to ground left burg in Sky Realm and preserves ground sovereignty.
File: modules/ui/burg-editor.js
Default sky altitude via DOM (no more magic 1000):

Change: add hidden input #burgDefaultSkyAltitude (default 1000 m) and read it everywhere altitude is defaulted (editor and “add burg on water” flow).
Why: centralizes default, documents units, and makes it configurable without touching code.
Files: index.html, modules/ui/burg-editor.js, modules/ui/burgs-overview.js
Sky State creation robustness:

Change: initialize a neutral diplomacy row for the new Sky State and extend existing states’ diplomacy arrays.
Change: do not forcibly set the anchor cell ownership to Sky state when creating the Sky Realm.
Why: prevents UI/editor crashes that assume diplomacy is rectangular; avoids accidental land transfer to Sky Realm.
File: modules/ui/editors.js
State hover/pin guards for Sky Realm:

Change: skip fog/hover/highlight when the target state has no geometry (e.g., Sky Realm) or the path is missing.
Why: fixes console errors in State hover and Pin feature.
Files: modules/dynamic/editors/states-editor.js, modules/ui/diplomacy-editor.js, modules/ui/military-overview.js
Watabou integration:

Change: only treat burgs as “sky” for city links when flying is true (not when only skyPort is set).
Why: ground burgs with sky ports should still have gates/roads/hubs/shanty, etc.
File: modules/ui/editors.js
User-visible Effects

Ground cities can have sea port + sky port + roads/trails simultaneously.
Toggling flying on shows altitude row; default altitude is read from the DOM.
Toggling flying off restores the burg to its ground state affiliation.
No more console errors when interacting with state hover/pin around the Sky Realm.
Potential Impacts

Land route generation may produce additional roads because sky-ported (but ground) burgs are now included.
Diplomacy arrays gain a neutral column for the Sky Realm when first created (non-breaking, UI-aligned).
Test Plan

Set sky port on a ground burg: verify roads/trails remain; sea port and other features unaffected.
Toggle flying on: burg state switches to Sky Realm; cell remains with ground state; altitude defaults from #burgDefaultSkyAltitude; air routes generate.
Toggle flying off: burg state returns to the ground state; altitude row hides; routes regenerate.
Hover/fog/pin states with the editors open: no errors with Sky Realm selected or hovered.
Open Watabou (city generator) links:
Ground + sky port: uses ground settings (gates/roads/hubs/shanty allowed).
Flying: uses sky settings (no farms/gates/hub etc. as appropriate).
Files Changed

modules/routes-generator.js
modules/ui/burg-editor.js
modules/ui/burgs-overview.js
modules/ui/editors.js
modules/dynamic/editors/states-editor.js
modules/ui/diplomacy-editor.js
modules/ui/military-overview.js
index.html
2025-09-08 15:09:59 +01:00
barrulus
c9b1a141f1 Versioning information added 2025-09-08 15:06:10 +01:00
Azgaar
88590e05e1 fix: 1227 2025-09-08 14:58:11 +01:00
Azgaar
d06ebe5ac8 fix(v1.108.11): add external icons to export in base64 format 2025-07-18 02:31:10 +02:00
Azgaar
738732364e fix(ui): correct marker note lookup by adding prefix 2025-07-02 00:52:41 +02:00
Azgaar
c26827bfe5 fix(markers-overview): correct note lookup by marker id 2025-07-01 23:16:07 +02:00
Azgaar
d96e339043 chore: update version to 1.108.8 2025-06-14 15:20:41 +02:00
Greger
004097ef93
Make id field in exports more consistent. (#1210)
The id field for geojson export was not consistent with csv exports.
Removes the prefix on routes, rivers and markers geojson, and on
markers csv, to make them all use only an integer as id.

This makes it easier to import and do joins in other software.
2025-06-11 00:42:31 +02:00
Azgaar
a6f66e9828 fix: grid layer to not be clickable 2025-03-09 13:29:45 +01:00
Ruichka
8131f25456
Allow data URI scheme for custom images (#1196)
* Allow data URL external images

* fix

* removed inconsistency
2025-03-08 14:51:48 +01:00
Azgaar
4dd34e13d1 refactor: drawReliefIcons, v1.108.4 2025-02-15 18:03:54 +01:00
Azgaar
791347b1ee feat: generate less water ice, v1.108.3 2025-02-15 17:45:16 +01:00
Azgaar
12b8b941e3 fix: remove old lake paths on drawFeatures, v1.108.2 2025-02-15 15:09:39 +01:00
Azgaar
d98ef5717e perf: set text-rendering to optimizeSpeed, v1.108.1 2025-02-15 14:43:51 +01:00
Azgaar
764993b680 fix: remove old feature masks, v1.108.0 2025-02-15 13:06:14 +01:00
Azgaar
e39ca793f2 feat: add growthRate to safe file 2025-02-13 02:54:37 +01:00
Azgaar
e526646076 fix: notes editor size to be relative to canvas size 2025-02-10 12:41:14 +01:00
Azgaar
51c47a18d2 fix: external icons - battle screen 2025-02-10 01:39:21 +01:00
Azgaar
01a69fd40b Merge branch 'master' of https://github.com/Azgaar/Fantasy-Map-Generator 2025-02-08 15:13:23 +01:00
Azgaar
22636b1b62 fix: data integrity checks - better Stripping issue detection, v1.107.1 2025-02-08 15:12:57 +01:00
Azgaar
0be14790d2 feat: rerender affected layers on auto-update 2025-02-08 14:15:59 +01:00
Azgaar
d51deffdac feat: make lined icons work for all elements, v1.107.0 2025-02-08 14:05:28 +01:00
Azgaar
5bb33311fb fix: 1.106.7 - rivers starting width calc 2024-12-17 17:11:13 +01:00
Azgaar
04c6fb3ee7 feat: like temp likeness, 1.106.6 2024-12-17 12:48:41 +01:00
Azgaar
f15bccd610 style: increase dialog buttons size 2024-12-16 14:30:11 +01:00
Azgaar
6d4c9f6b18 fix: sumap - clip routes by bbox 2024-12-14 15:12:38 +01:00
Azgaar
488f51a0f4 fix: don't mask routes 2024-12-13 19:53:57 +01:00
Azgaar
ced7b88054 fix: submap - generate in current canvas size 2024-12-13 13:15:01 +01:00
Azgaar
50ee5150c1 fix: #1174 2024-12-13 11:58:53 +01:00
Azgaar
66d22f26c0
[Draft] Submap refactoring (#1153)
* refactor: submap - start

* refactor: submap - continue

* Merge branch 'master' of https://github.com/Azgaar/Fantasy-Map-Generator into submap-refactoring

* refactor: submap - relocate burgs

* refactor: submap - restore routes

* refactor: submap - restore lake names

* refactor: submap - UI update

* refactor: submap - restore river and biome data

* refactor: submap - simplify options

* refactor: submap - restore rivers

* refactor: submap - recalculateMapSize

* refactor: submap - add middle points

* refactor: submap - don't add middle points, unified findPath fn

* chore: update version

* feat: submap - relocate out of map regiments

* feat: submap - fix route gen

* feat: submap - allow custom number of cells

* feat: submap - add checkbox submapRescaleBurgStyles

* feat: submap - update version hash

* chore: supporters update

---------

Co-authored-by: Azgaar <azgaar.fmg@yandex.com>
2024-12-12 13:11:54 +01:00
Azgaar
03c7db32ef fix: #1172 2024-11-27 12:21:36 +01:00
Azgaar
fa03b2d705 fix: #1170 2024-11-24 15:02:56 +01:00
Dyxang
ca8e723006
Temperature parameters can be customized (#1162)
* Temperature parameters can be customized

* fix typo

* update to 1.105.22

* Update index.html
2024-11-07 14:23:38 +01:00
Ryan D. Guild
d7f5cae229
Removed priority queue in favor of FlatQueue (#1157)
* removed priority queue in favor of simple array extension as it will be easier to migrate to esm

* patch: bump version

* spacing

* moved references to globalThis

* demonstrate module interop

* added version to priority-queue and moved to utils to follow dom loading pattern

* removed PriorityQueue in favor of FlatQueue

* update index.html

* never mind that force push I don't know how to amend commits right

* missing capitalization

* priority set to 0 on 541

---------

Co-authored-by: RyanGuild <ryan.guild@us-ignite.org>
2024-10-26 14:26:59 +02:00
Azgaar
54491cfd09 feat: zones editor - don't close other editors on open 2024-10-22 23:04:57 +02:00
Azgaar
5ac99d180d chore: parse DEBUG setting as an object 2024-10-22 14:45:25 +02:00
Azgaar
6d69eb855f fix: zones editor - legend to be toggable 2024-10-19 14:02:04 +02:00
Azgaar
8a4f28b321 fix: CRLF issue 2024-10-19 13:32:59 +02:00
Azgaar
87e1dc2c5d
Draw state labels improvement (#1155)
* chore: render debug elements

* feat: redo draw state labels algo

---------

Co-authored-by: Azgaar <azgaar.fmg@yandex.com>
2024-10-19 13:25:34 +02:00
Azgaar
efbe0373b0 fix: lock all burgs 2024-10-16 15:20:44 +02:00
Azgaar
c447afb829 fix: features rendering - close the ring 2024-10-13 20:32:37 +02:00
Azgaar
6c37c7babf fix: #1152, don't keep removed locked cultures on regenerate 2024-10-13 15:10:31 +02:00
Azgaar
26b659a59e fix #1152 2024-10-11 12:17:33 +02:00
Azgaar
c795ac6c30 fix: allow to load smaller namesbase without issues on regeneration 2024-10-09 01:08:47 +02:00
Azgaar
56597d961d fix: remove unwanted states styling 2024-10-03 13:05:10 +02:00
Azgaar
2d0030e3d4 feat: allow to crean data in case of load error 2024-10-01 21:20:29 +02:00
Azgaar
80da2f0cda fix: gap path to not omit the M path sign 2024-09-29 15:09:29 +02:00
Azgaar
c04fb2bfca refactor: burg types 2024-09-27 13:32:22 +02:00
Azgaar
84c326e347 fix: issue with feature vertex being out of bound 2024-09-25 17:05:31 +02:00
Azgaar
949a486bf8 fix: redraw features on load 2024-09-25 13:18:22 +02:00