diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-05-31 12:11:07 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 11:54:52 +0100 |
commit | a1fa1447fd6ffd11c11c8e5f3abf68faabec24b7 (patch) | |
tree | c2bdcf663cb234f5f37e7648cde077170a1bc7d6 | |
parent | ee8ac34adc55286bde48d90dc9d24dbbc2406c11 (diff) | |
download | wilderness-war-a1fa1447fd6ffd11c11c8e5f3abf68faabec24b7.tar.gz |
Clamp VP tracker to stay on the VP track...
-rw-r--r-- | play.js | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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) |