summaryrefslogtreecommitdiff
path: root/ui.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-06-07 16:08:16 +0200
committerTor Andersson <tor@ccxvii.net>2023-02-18 12:12:42 +0100
commite8da7ed4da4c207769a259c7434f1e9558fe2d20 (patch)
tree1baad765edf867d76ca170e79bbf4f42984462c2 /ui.js
parent068eb263197335f0abde0ab38bc3780fec40c109 (diff)
downloadshores-of-tripoli-e8da7ed4da4c207769a259c7434f1e9558fe2d20.tar.gz
tripoli: Tripolitanian events
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/ui.js b/ui.js
index 2a1fbc8..6071a9c 100644
--- a/ui.js
+++ b/ui.js
@@ -169,6 +169,7 @@ function on_update() {
else
document.getElementById("active_card").className = "card show tr_card_" + (game.card-27);
+ update_year_marker(game.year);
update_season_marker(game.season);
update_pieces();
update_cards();
@@ -296,6 +297,11 @@ function on_card_event() {
hide_popup_menu();
}
+function on_card_take() {
+ send_action('card_take', current_popup_card);
+ hide_popup_menu();
+}
+
function on_card_move_frigates() {
send_action('card_move_frigates', current_popup_card);
hide_popup_menu();
@@ -328,6 +334,7 @@ function on_click_card(evt) {
} else {
let menu = [];
if (is_card_action('card_event', card)) menu.push('card_event');
+ if (is_card_action('card_take', card)) menu.push('card_take');
if (is_card_action('card_move_frigates', card)) menu.push('card_move_frigates');
if (is_card_action('card_pirate_raid', card)) menu.push('card_pirate_raid');
if (is_card_action('card_build_gunboat', card)) menu.push('card_build_gunboat');