summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-08-12 16:08:30 +0200
committerTor Andersson <tor@ccxvii.net>2024-08-12 16:08:30 +0200
commit07563bb8c48d168c8f8886262793e61fafee0073 (patch)
tree77fe56a8209d63574eb25ca813b27fd512f1c6c7 /play.js
parent9b9a7e2c874a8f22d16d1f57eea81f16aa8b9467 (diff)
downloadtime-of-crisis-07563bb8c48d168c8f8886262793e61fafee0073.tar.gz
v2: click to use market and port improvements
Diffstat (limited to 'play.js')
-rw-r--r--play.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/play.js b/play.js
index 42352b6..4da1841 100644
--- a/play.js
+++ b/play.js
@@ -974,6 +974,9 @@ function on_init() {
ui.imp_port[region] = create_building(region, "improvement port hide")
ui.imp_temple[region] = create_building(region, "improvement temple hide")
+ register_action(ui.imp_market[region], "use_market", region)
+ register_action(ui.imp_port[region], "use_port", region)
+
register_action(ui.capital[region], "capital", region)
register_action(ui.regions[region], "region", region)
@@ -1249,6 +1252,12 @@ function on_update() {
ui.militia[region].classList.toggle("selected", view.selected_militia === region)
+ ui.imp_market[region].classList.toggle("selected", view.selected_market === region)
+ ui.imp_market[region].classList.toggle("spent", view.umarket & (1 << region))
+
+ ui.imp_port[region].classList.toggle("selected", view.selected_port === region)
+ ui.imp_port[region].classList.toggle("spent", view.uport & (1 << region))
+
let imp_off = 0
if (has_amphitheater(region))