summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-05-31 12:11:07 +0200
committerTor Andersson <tor@ccxvii.net>2023-02-18 11:54:52 +0100
commita1fa1447fd6ffd11c11c8e5f3abf68faabec24b7 (patch)
treec2bdcf663cb234f5f37e7648cde077170a1bc7d6
parentee8ac34adc55286bde48d90dc9d24dbbc2406c11 (diff)
downloadwilderness-war-a1fa1447fd6ffd11c11c8e5f3abf68faabec24b7.tar.gz
Clamp VP tracker to stay on the VP track...
-rw-r--r--play.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/play.js b/play.js
index 51f4122..693c177 100644
--- a/play.js
+++ b/play.js
@@ -1373,10 +1373,14 @@ function update_map() {
}
let vpm = document.getElementById("vp_marker");
- if (view.vp > 10)
+ if (view.vp > 20)
+ vpm.className = VP10_MARKER + "french_vp_10";
+ else if (view.vp > 10)
vpm.className = VP10_MARKER + "french_vp_" + (view.vp-10);
else if (view.vp > 0)
vpm.className = VP_MARKER + "french_vp_" + view.vp;
+ else if (view.vp < -20)
+ vpm.className = VP10_MARKER + "flip british_vp_10";
else if (view.vp < -10)
vpm.className = VP10_MARKER + "flip british_vp_" + (-(view.vp+10));
else if (view.vp < 0)