Commit graph

1215 commits

Author SHA1 Message Date
Claude
390e70f63a
debug: add logging to troubleshoot default map issue 2025-11-14 03:43:51 +00:00
Claude
45f56b8c5d
fix: persist onloadBehavior setting for default map feature
The default map feature was not working on page refresh because the
onloadBehavior dropdown value was not being persisted or restored.

Changes:
- main.js: Restore onloadBehavior from localStorage on page load
- save.js: saveAsDefaultMap() now saves "default" to localStorage
- save.js: clearDefaultMap() now removes the localStorage setting
- index.html: Update version hashes to 1.108.13

Now when users click "Set as default", the setting persists across
page refreshes and their default map loads automatically.
2025-11-14 03:38:33 +00:00
Claude
57b7980dbc
fix(v1.108.13): add comprehensive race condition guards in load.js
Add typeof checks for all function calls to modules loaded with defer attribute.
This prevents ReferenceError when loading old maps (1.108.11) in version 1.108.13.

Functions protected:
- getCurrentPreset() - from style.js
- addCustomColorScheme() - from style.js
- updateTextureSelectValue() - from style.js
- focusOn() - from editors.js
- invokeActiveZooming() - from zoom.js
- fitMapToScreen() - from zoom.js
- declareFont() - from fonts.js
- moveBurgToGroup() - from burgs.js (3 locations)

This fixes zoom/pan issues when loading old maps.
2025-11-14 03:30:12 +00:00
Claude
74b9310c57
fix: check if updateTextureSelectValue is defined before calling 2025-11-14 03:22:23 +00:00
Claude
8d7a1635f9
fix: prevent ReferenceError when loading maps before style.js loads
Check if heightmapColorSchemes is defined before accessing it to
prevent race condition between load.js and style.js initialization.
2025-11-14 03:10:35 +00:00
Nathan Eckenrode
428349f6fb
Merge branch 'master' into claude/claude-md-mhy85sj7tlvzwb5w-01QzBpdgGJXE5Qk3JaNupuxM 2025-11-13 22:01:51 -05:00
Claude
769d3a31bb
feat: add Obsidian vault integration for modern Markdown notes
Add comprehensive Obsidian integration as intermediate step toward
PostgreSQL migration, enabling modern Markdown-based note editing:

**Features:**
- Obsidian Local REST API integration for vault access
- Coordinate-based note matching (searches vault YAML frontmatter)
- Shows top 5-8 closest matches when clicking burgs/markers
- Modern Markdown editor with live preview
- [[Wikilink]] support for connecting notes
- "Open in Obsidian" button to jump to native app
- Configuration UI for API setup and testing

**Technical Implementation:**
- modules/io/obsidian-bridge.js - Core API integration layer
- modules/ui/obsidian-notes-editor.js - Markdown editor UI
- modules/ui/obsidian-config.js - Configuration panel
- OBSIDIAN_INTEGRATION.md - Complete setup/usage guide

**Coordinate Matching:**
- Parses YAML frontmatter for x/y coordinates
- Calculates distance to clicked element
- Supports nested (coordinates.x) and flat (x:) formats
- Handles missing FMG IDs (common with PostgreSQL imports)

**User Workflow:**
1. Configure Obsidian REST API connection
2. Click burg/marker in FMG
3. System finds matching notes by coordinates
4. Select note or create new one
5. Edit in modern Markdown editor
6. Save syncs to Obsidian vault instantly

This replaces the "Win95-style TinyMCE" editor with a clean,
modern Markdown experience while maintaining compatibility with
the eventual PostgreSQL backend migration. Users can edit notes
in either FMG or Obsidian - both stay in sync via file system.

Version: 1.108.13
2025-11-14 02:57:07 +00:00
Claude
acc2d112f3
feat: add default map setting feature
Add ability to set a specific map as the default that opens on load:

- Add 'Open default map' option to onload behavior dropdown
- Implement saveAsDefaultMap() to store map as default in IndexedDB
- Implement clearDefaultMap() to remove default map setting
- Modify checkLoadParameters() to load default map when configured
- Add UI buttons in Save dialog for setting/clearing default map
- Update version to 1.108.12 and hash in index.html

Users can now:
1. Open any map they want as default
2. Go to Options > Onload behavior > Select "Open default map"
3. Save > Click "Set as default" button
4. The map will now open automatically every time

This sets the foundation for the planned time-based worldbuilding
and lore database features by ensuring users always start with
their primary world map.
2025-11-14 02:33:16 +00:00
Azgaar
538cc3423a fix: 1227 2025-08-29 14:36:34 +02: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
c891689796 feat(ai-generator): update supported AI models list 2025-06-14 15:24:23 +02:00
Azgaar
bba3587e50 refactor: ollama generation 2025-06-14 15:20:01 +02:00
Krory
fe2fa6d6b8
Ollama integration as a new AI provider (#1208)
* ollama implementation

* ollama implementation

* Update ai-generator.js

* Update README.md

* Create OLLAMAREADME.MD

* Update OLLAMAREADME.MD

* Update notes-editor.js

* Update index.html

* Update OLLAMAREADME.MD

* Update ai-generator.js
2025-06-14 14:03:06 +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
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
Issac411
7b8ffd025f
custom pictures for regiments (#1183)
* forms and ajustements

* variable size for style as requested
2025-01-19 23:29:27 +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
6d4c9f6b18 fix: sumap - clip routes by bbox 2024-12-14 15:12:38 +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
610a2d9ae6 chore: update supporters 2024-11-28 12:19:05 +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
Azgaar
8db9dc9bed chore: supporters update 2024-11-15 15:53:41 +01:00
Azgaar
8d621ba9ce
AI Claude support (#1167)
* Add Claude AI support (#1165)

* feat: ai generator - add support for claude

* feat: ai generator - add claude support

* refactor: clean up API calls

---------

Co-authored-by: Azgaar <maxganiev@yandex.com>

* feat: ai - claude support

---------

Co-authored-by: aesli <37640637+aesliva@users.noreply.github.com>
Co-authored-by: Azgaar <azgaar.fmg@yandex.com>
2024-11-14 02:05:34 +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
Ángel Montero Lamas
91dc16878e
Stroke dash to cells (#1159)
* style.js sorted items alphabetically

* style.js added strokeDash to "cells"
2024-10-26 14:40:43 +02:00
Azgaar
1706fa0981 fix: add p to priority queue 2024-10-26 14:29:52 +02: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