From 73e9d222aedde6106aff6f411d6eb6f5808dd27e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Montero=20Lamas?= Date: Tue, 26 Mar 2024 19:52:17 +0100 Subject: [PATCH] Nautical mile option in Units-Editor (#1059) * Nautical mile option in Units-Editor In Distance --> Distance Unit. * adding nautical league The distance 5.556 km = 1 league, is put on the nautical league and used the English land league 4.828 to differentiate both units. * Update versioning.js changed 1.97.02 to 1.97.03 * fix in versioning and index.html * writing ver 1.97.03 in hopes of fixing the version conflict * increasing ver 1.97.05 to fix --------- Co-authored-by: Azgaar --- index.html | 4 +++- modules/ui/world-configurator.js | 8 +++++--- versioning.js | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 9fa9dbc7..c5c0e87d 100644 --- a/index.html +++ b/index.html @@ -5149,6 +5149,8 @@ + + @@ -8057,7 +8059,7 @@ - + diff --git a/modules/ui/world-configurator.js b/modules/ui/world-configurator.js index c47beaca..0f25057e 100644 --- a/modules/ui/world-configurator.js +++ b/modules/ui/world-configurator.js @@ -113,9 +113,11 @@ function editWorld() { function toKilometer(v) { if (unit === "km") return v; - else if (unit === "mi") return v * 1.60934; - else if (unit === "lg") return v * 5.556; - else if (unit === "vr") return v * 1.0668; + if (unit === "mi") return v * 1.60934; + if (unit === "lg") return v * 4.828; + if (unit === "vr") return v * 1.0668; + if (unit === "nmi") return v * 1.852; + if (unit === "nlg") return v * 5.556; return 0; // 0 if distanceUnitInput is a custom unit } diff --git a/versioning.js b/versioning.js index 1574e729..5f3d0848 100644 --- a/versioning.js +++ b/versioning.js @@ -1,7 +1,7 @@ "use strict"; // version and caching control -const version = "1.97.04"; // generator version, update each time +const version = "1.97.05"; // generator version, update each time { document.title += " v" + version;