diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-04-20 00:17:10 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-04-20 00:17:10 +0200 |
commit | 5611ca2a4dfd32a74df71e73f721ebfd1633db0a (patch) | |
tree | e3087ddf1e32693f1a8fd7b72eb01d5f3cea818b | |
parent | 1080f804ea5f8fcb5fca4e4b9026185677de1b7a (diff) | |
download | plantagenet-5611ca2a4dfd32a74df71e73f721ebfd1633db0a.tar.gz |
Only show lords in play in planning window.
-rw-r--r-- | play.js | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -1363,12 +1363,17 @@ function update_plan() { if (is_planning) { ui.plan_actions.classList.remove("hide") for (let lord = 0; lord < 28; ++lord) { - if (is_action("plan", lord)) { - ui.plan_action_cards[lord].classList.add("action") - ui.plan_action_cards[lord].classList.remove("disabled") + if (is_lord_in_game(lord)) { + ui.plan_action_cards[lord].classList.remove("hide") + if (is_action("plan", lord)) { + ui.plan_action_cards[lord].classList.add("action") + ui.plan_action_cards[lord].classList.remove("disabled") + } else { + ui.plan_action_cards[lord].classList.remove("action") + ui.plan_action_cards[lord].classList.add("disabled") + } } else { - ui.plan_action_cards[lord].classList.remove("action") - ui.plan_action_cards[lord].classList.add("disabled") + ui.plan_action_cards[lord].classList.add("hide") } } if (is_action("plan", -1)) { |