diff options
author | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-10-04 11:36:41 +0200 |
---|---|---|
committer | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-10-04 11:36:41 +0200 |
commit | 65ca540db89363f2a20c7b32005de400490cdaae (patch) | |
tree | caefd72b4c545ccd48234e3f9edd221b5136a4fd /play.js | |
parent | 1bf9942cd30465f860d24a5251391a61a1bfae12 (diff) | |
download | algeria-65ca540db89363f2a20c7b32005de400490cdaae.tar.gz |
fln deployment
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -114,6 +114,10 @@ function is_area_remote(l) { return (view.areas[l] & AREA_REMOTE_MASK) === AREA_REMOTE_MASK } +function is_area_country(l) { + return data.areas[l].type === COUNTRY +} + // === UNIT STATE === // location (8 bits), op box (2 bits), dispersed (1 bit), airmobile (1 bit), neutralized (1 bit) @@ -401,6 +405,10 @@ function update_map() { ui.eliminated.appendChild(e) } else { let box_id = unit_box(u) + if (is_area_country(loc)) { + // only single box in France, Morocco and Tunisia + box_id = 0 + } if (!ui.boxes[loc * 4 + box_id].contains(e)) ui.boxes[loc * 4 + box_id].appendChild(e) } |