Azgaar / Fantasy-Map-Generator

Web application generating interactive and highly customizable maps
https://azgaar.github.io/Fantasy-Map-Generator
Other
4.59k stars 657 forks source link

Burg Regeneration takes into account deleted states #1024

Closed DeuzeksMcKinna closed 11 months ago

DeuzeksMcKinna commented 11 months ago

Describe the bug When working on a map that initially has X states number, after deleting these states (X or any lower number deleted) and Regenerating Burgs, the amount of burgs generated will be X+N where N is the number set on "Towns Number".

Steps to reproduce

  1. Create a map with 10 States
  2. Delete All States
  3. Set the "Towns Number" Slider to 6
  4. Click Regenerate Burgs
  5. 16 burgs will be generated

Expected behavior Burgs generated via Regeneration being equal in amount to the "Towns Number" slider when on an empty map, and having the minimum limit only for existing States

.map file Adankan_2023-12-04-22-12.zip 38 States with "Removed:TRUE" Will happen on newly-generated maps too

Screenshots

image

Azgaar commented 11 months ago

Thanks. Burgs number should be Number of existing states + Number of burgs from options. So just need to filter our the removed burgs in code.

Azgaar commented 11 months ago

@DeuzeksMcKinna, please check now

DeuzeksMcKinna commented 11 months ago

Working as intended!