Dev submaps (#770)

* bioms shouldn't be masked or the style selection box is useless

* fix: misleading comment

* experimental submapping feature

* burg remapping

* Submap with options

* Fix: calculating absolute flux from precipitation normal-value.

* effective distanceScale

* updated resampler

* fix: missing cell

* Fix: River automatic rerender on regeneration.

* FIX: wrong culture migration

* fixed 0 index burg bug, more accurate coast detection for burgs

* FIX: wrong burg cell id

* fix invalid feature number at burg.ports, option to disable regenerations

* Relocate submap

* update height model and scale parameters

* new menu

* Dropbox OAuth implementation and Cloud framework

* add some space

* removing uneccesary logs, defer script load

* map position on planet, fix wrong riverbed generation

* fix:riverbed generation

* better cell sampler

* Auto-Smoothing,dist fix

* FIX: incorrect province copy and minor fix of rebels

* Cleanup

* FIX: water detection bug

* Recompute centers (states, cultures, provinces)

* activating forwardmap

* FIX: port burg relocation algo

* FIX: coast detection (for burgs)

* Fix: invalid html id

* add dot

* update for FMG 1.73

* Update submap gui

* refactored submap ui options

* Copy all visible military units from the old map.

* add info text

* Add Markers.deleteMarker API.

* Lock markers and lock burgs options

* better comment

* submapper gui updates, remove feature mapping on/off

* Fix typo (thx evolvedexperiment)

* fix ugly GUI (2 digit roundoff)

* resample dialog

* Town Promotion to largetown

* don't promote to capitals.

* Fix typo

* round style settings

* do not draw removed burgs

* Fix port cell search algo

* Fix: robust error handling, no error for 0.

* submap: projection moved to options, fix double burg error

* complete rewrite of burg relocation

* findcell by coordinates

* prepare to merge, add comments, remove fluff

* replacing lodash with deepCopy implementation

Co-authored-by: Mészáros Gergely <monk@geotronic.hu>
This commit is contained in:
Gergely Mészáros, Ph.D 2022-04-15 11:45:02 +02:00 committed by GitHub
parent 3cbd451df9
commit 5703e62177
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 741 additions and 53 deletions

View file

@ -335,25 +335,25 @@ function copyMapURL() {
.catch(err => tip("Could not copy URL: " + err, false, "error", 5000));
}
function changeCellsDensity(value) {
const convert = v => {
if (v == 1) return 1000;
if (v == 2) return 2000;
if (v == 3) return 5000;
if (v == 4) return 10000;
if (v == 5) return 20000;
if (v == 6) return 30000;
if (v == 7) return 40000;
if (v == 8) return 50000;
if (v == 9) return 60000;
if (v == 10) return 70000;
if (v == 11) return 80000;
if (v == 12) return 90000;
if (v == 13) return 100000;
};
const cells = convert(value);
const cellsDensityConstants = {
1: 1000,
2: 2000,
3: 5000,
4: 10000,
5: 20000,
6: 30000,
7: 40000,
8: 50000,
9: 60000,
10: 70000,
11: 80000,
12: 90000,
13: 100000,
};
pointsInput.setAttribute("data-cells", cells);
function changeCellsDensity(value) {
const cells = value in cellsDensityConstants? cellsDensityConstants[value]: 1000;
pointsInput.dataset.cells = cells;
pointsOutput_formatted.value = cells / 1000 + "K";
pointsOutput_formatted.style.color = cells > 50000 ? "#b12117" : cells !== 10000 ? "#dfdf12" : "#053305";
}