Fantasy-Map-Generator/modules
Basile Clement edfcad4e8c
Generate a legend for manually added markers (#753)
Markers added by procedural generation have custom notes depending on
the type of marker (e.g. dungeons have a procedurally generated map);
however, the notes for markers manually added by the user are empty.

This patch separates the cell selection logic from the legend and name
generation logic in markers-generator.js, so that the latter can be
shared with manually added markers.  There is some additional
simplifications such as storing the dx/dy/px/min/each values directly in
the markers table to simplify the writing of the generic "list and add"
loop in `generateTypes()`.

Currently, the legend is only generated when adding a marker of the same
type as an existing marker, and only when a legend generation function
is available for that type.  To generate a marker of a type that is not
currently present on the map, one must first change the type field of an
existing marker (which will not get a procedural note), then use "Add
additional marker of that type".  The UI for this can be improved later.

Co-authored-by: Basile Clement <basile-github@clement.pm>
2022-03-07 22:29:08 +03:00
..
io dropbox - load script dynamically 2022-02-08 00:47:17 +03:00
ui Generate a legend for manually added markers (#753) 2022-03-07 22:29:08 +03:00
burgs-and-states.js round numbers 2022-02-12 21:37:06 +03:00
coa-generator.js dissalow local run 2022-02-06 01:04:11 +03:00
coa-renderer.js dissalow local run 2022-02-06 01:04:11 +03:00
cultures-generator.js minmax util function 2021-10-10 17:59:27 +03:00
fonts.js dissalow local run 2022-02-06 01:04:11 +03:00
heightmap-generator.js select template correctly 2022-02-23 22:14:25 +03:00
heightmap-templates.js fix atoll heightmap template 2021-08-07 18:37:44 +03:00
lakes.js replace old iife by a simpler ones 2021-08-04 23:49:02 +03:00
markers-generator.js Generate a legend for manually added markers (#753) 2022-03-07 22:29:08 +03:00
military-generator.js military - fix rural fleet 2021-11-10 23:57:27 +03:00
names-generator.js fix Basque base 2021-11-22 10:09:15 +03:00
ocean-layers.js replace old iife by a simpler ones 2021-08-04 23:49:02 +03:00
relief-icons.js minmax util function 2021-10-10 17:59:27 +03:00
religions-generator.js fix syntax 2022-01-10 16:54:26 +03:00
river-generator.js normalize prec, flux and river width 2021-12-30 18:49:36 +03:00
routes-generator.js replace old iife by a simpler ones 2021-08-04 23:49:02 +03:00
voronoi.js Fix: flux calculation from area-propotional value instead of normal value. (#654) 2021-08-15 12:43:20 +03:00