diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-12-18 16:56:07 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 13:02:38 +0100 |
commit | a3782cd051b4a5c10c3a41062c7b4d6063bc6a60 (patch) | |
tree | ee90d4412b4f4a12df00347aa5b02fee86fd9a06 /play.js | |
parent | 38831a6bc8ba83bd09fa09ba3a16da5cdfcac5c0 (diff) | |
download | nevsky-a3782cd051b4a5c10c3a41062c7b4d6063bc6a60.tar.gz |
Black and Baltic Sea Trade.
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -74,6 +74,11 @@ function on_click_veche_coin(evt) { send_action('veche_coin') } +function on_click_veche(evt) { + if (evt.button === 0) + send_action('veche') +} + const SUMMER = 0 const EARLY_WINTER = 1 const LATE_WINTER = 2 @@ -156,6 +161,10 @@ function pack4_get(word, n) { return (word >>> n) & 15 } +function is_veche_action() { + return !!(view.actions && view.actions.veche === 1) +} + function is_lord_action(lord) { return !!(view.actions && view.actions.lord && set_has(view.actions.lord, lord)) } @@ -1259,6 +1268,8 @@ function on_update() { update_plan() update_cards() + ui.veche.classList.toggle("action", is_veche_action()) + action_button("use_legate", "Legate") action_button("stonemasons", "Stonemasons") @@ -1487,6 +1498,7 @@ function build_map() { }) document.getElementById("legate").addEventListener("mousedown", on_click_legate) + ui.veche.addEventListener("mousedown", on_click_veche) for (let name in original_boxes) { let x = round(original_boxes[name][0] * MAP_DPI / 300) |