From 07563bb8c48d168c8f8886262793e61fafee0073 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 12 Aug 2024 16:08:30 +0200 Subject: v2: click to use market and port improvements --- play.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'play.js') 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)) -- cgit v1.2.3