summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-04-20 15:53:15 +0200
committerTor Andersson <tor@ccxvii.net>2024-04-20 15:57:33 +0200
commitc7fc0423a50a27f9ad30d15f8896450979663d94 (patch)
tree06bcf3d9c1e0085b54ed52652c1e58b500791f35 /play.js
parent2808918b1f4a8c11bbc1b2dfc995760199a64e77 (diff)
downloadplantagenet-c7fc0423a50a27f9ad30d15f8896450979663d94.tar.gz
Clean up prompts for Welsh Rebellion and Warwick's Propaganda.
Diffstat (limited to 'play.js')
-rw-r--r--play.js7
1 files changed, 5 insertions, 2 deletions
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")