From 26073215b9a279d3ea77274143da385615dd8a65 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 18 Jan 2023 13:28:02 +0100 Subject: 2E supply rules. Only show Supply button if supply is possible. Smarter Lodya when Novgorod is in enemy hands. --- play.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'play.js') diff --git a/play.js b/play.js index fd4237e..ace1c6c 100644 --- a/play.js +++ b/play.js @@ -1231,9 +1231,10 @@ function update_locale(loc) { ui.locale[loc].classList.toggle("action", is_locale_action(loc) || is_laden_march_action(loc)) ui.locale[loc].classList.toggle("laden", is_laden_march_action(loc)) + ui.locale[loc].classList.toggle("supply_path", !!(view.supply && view.supply[0] === loc)) + ui.locale[loc].classList.toggle("supply_source", !!(view.supply && view.supply[1] === loc)) if (ui.locale_name[loc]) { ui.locale_name[loc].classList.toggle("action", is_locale_action(loc) || is_laden_march_action(loc)) - ui.locale_name[loc].classList.toggle("laden", is_laden_march_action(loc)) } ui.locale_markers[loc].replaceChildren() -- cgit v1.2.3