From c7fc0423a50a27f9ad30d15f8896450979663d94 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 20 Apr 2024 15:53:15 +0200 Subject: Clean up prompts for Welsh Rebellion and Warwick's Propaganda. --- play.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'play.js') diff --git a/play.js b/play.js index c6710ae..f9340a9 100644 --- a/play.js +++ b/play.js @@ -31,6 +31,8 @@ function map2_get(map, x, y, v) { } function set_has(set, item) { + if (!set) + return false let a = 0 let b = set.length - 1 while (a <= b) { @@ -1240,7 +1242,7 @@ function update_locale(loc) { layout_locale_cylinders(loc) ui.locale[loc].classList.toggle("action", is_action("locale", loc) || is_action("laden_march", loc)) - ui.locale[loc].classList.toggle("selected", view.where === loc) + ui.locale[loc].classList.toggle("selected", view.where === loc || set_has(view.where, 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]) { @@ -1709,7 +1711,8 @@ function on_update() { action_button("add_men_at_arms", "Add Men at Arms") // REMOVE INFLUENCE - action_button("remove_favour", "Remove favour") + action_button("influence", "Influence") + action_button("favour", "Favour") action_button("pass", "Pass") action_button("done", "Done") -- cgit v1.2.3