diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-12-15 12:30:28 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 13:02:38 +0100 |
commit | 65dff0c518948bf6d552b92f01901320d40ba448 (patch) | |
tree | 6151231b1ca3edd4d72ee5f2ee61d46ba049fa67 /play.js | |
parent | add062d5c9bc31f2134912d93a24058f8829a22c (diff) | |
download | nevsky-65dff0c518948bf6d552b92f01901320d40ba448.tar.gz |
March in "action" state to prevent lots of extra clicks.
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -23,7 +23,10 @@ const VASSAL_MUSTERED = 2 const NOWHERE = -1 const CALENDAR = 100 + const LEGATE = 100 +const LEGATE_INDISPOSED = -2 +const LEGATE_ARRIVED = -1 const round = Math.round const floor = Math.floor @@ -965,13 +968,13 @@ function update_lord(ix) { } function update_legate() { - if (view.call_to_arms.legate < 0) { + if (view.call_to_arms.legate === LEGATE_INDISPOSED) { ui.legate.classList.add("hide") } else { ui.legate.classList.remove("hide") ui.legate.classList.toggle("action", is_legate_action()) ui.legate.classList.toggle("selected", is_legate_selected()) - if (view.call_to_arms.legate === 100) { + if (view.call_to_arms.legate === LEGATE_ARRIVED) { ui.legate.style.top = "1580px" ui.legate.style.left = "170px" } else { @@ -1230,6 +1233,8 @@ function on_update() { action_button("laden", "Laden") action_button("unladen", "Unladen") + action_button("use_legate", "Legate") + action_button("sail", "Sail") action_button("march", "March") action_button("siege", "Siege") |