diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-03-05 20:34:23 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-05-03 18:48:15 +0200 |
commit | 71c0e5bc691ce148515ebf4d6e2fba96c85c2ccb (patch) | |
tree | 0aa72b83070ea2b6eb870ff2c52da5d5c2ff3f10 /play.js | |
parent | 1397f7f5ac4e93cc7e01c3bf9505932722bfc6ef (diff) | |
download | andean-abyss-71c0e5bc691ce148515ebf4d6e2fba96c85c2ccb.tar.gz |
Extend operation states with common SA actions using Object.assign
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -231,6 +231,11 @@ function get_layout_radius(s) { } function init_ui() { + register_action(ui.resources[GOVT], "pay", GOVT) + register_action(ui.resources[FARC], "pay", FARC) + register_action(ui.resources[AUC], "pay", AUC) + register_action(ui.resources[CARTELS], "pay", CARTELS) + for (let i = 0; i < data.spaces.length; ++i) { let id = data.spaces[i].id let type = data.spaces[i].type @@ -649,6 +654,11 @@ function on_update() { ui.header.classList.toggle("cartels", view.current === CARTELS) ui.header.classList.toggle("farc", view.current === FARC) + ui.resources[GOVT].classList.toggle("action", is_action("pay", GOVT)) + ui.resources[FARC].classList.toggle("action", is_action("pay", FARC)) + ui.resources[AUC].classList.toggle("action", is_action("pay", AUC)) + ui.resources[CARTELS].classList.toggle("action", is_action("pay", CARTELS)) + ui.player[GOVT].classList.toggle("hide", view.scenario < 3) ui.player[AUC].classList.toggle("hide", view.scenario < 4) ui.player[CARTELS].classList.toggle("hide", view.scenario < 4) |