From 4a7765e6e0d237119e761bfd0afa9bf06dbfbd3c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 8 Sep 2022 19:26:04 +0200 Subject: Appearance tweaks. --- play.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'play.js') diff --git a/play.js b/play.js index 8eb6983..5b08e2a 100644 --- a/play.js +++ b/play.js @@ -666,8 +666,6 @@ function update_unit(e, u) { if (is_italian_unit(u)) e.classList.toggle("italian", false) } - e.classList.toggle("disrupted", is_unit_disrupted(u)) - e.classList.toggle("unsupplied", is_unit_unsupplied(u)) } let stack_list = new Array(map_w * map_h + 21) @@ -720,6 +718,8 @@ function layout_stack(stack, hex, start_x, start_y, wrap, xdir) { update_unit(e, u) + e.classList.toggle("disrupted", is_unit_disrupted(u)) + e.classList.toggle("unsupplied", is_unit_unsupplied(u)) e.classList.toggle("action", !view.battle && is_unit_action(u)) e.classList.toggle("selected", !view.battle && is_unit_selected(u)) e.classList.toggle("moved", is_unit_moved(u)) @@ -745,6 +745,9 @@ function update_map() { ui.bardia.classList.toggle("axis", (view.fortress & 1) === 0) ui.benghazi.classList.toggle("axis", (view.fortress & 2) === 0) ui.tobruk.classList.toggle("axis", (view.fortress & 4) === 0) + ui.bardia.classList.toggle("allied", (view.fortress & 1) !== 0) + ui.benghazi.classList.toggle("allied", (view.fortress & 2) !== 0) + ui.tobruk.classList.toggle("allied", (view.fortress & 4) !== 0) for (let i = 0; i < stack_list.length; ++i) { stack_list[i][0].length = 0 -- cgit v1.2.3