summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-03-05 20:34:55 +0100
committerTor Andersson <tor@ccxvii.net>2023-05-03 18:48:15 +0200
commit2d66908b20d43a39974f99a0ec74212eaa5031ed (patch)
tree12d8197c8110604fbfb61afac5ff21d400bedfed /play.js
parent71c0e5bc691ce148515ebf4d6e2fba96c85c2ccb (diff)
downloadandean-abyss-2d66908b20d43a39974f99a0ec74212eaa5031ed.tar.gz
Patrol, Sweep & Assault.
TODO: LimOp Patrol - only move to one destination.
Diffstat (limited to 'play.js')
-rw-r--r--play.js21
1 files changed, 11 insertions, 10 deletions
diff --git a/play.js b/play.js
index f7aff9f..22dcf85 100644
--- a/play.js
+++ b/play.js
@@ -1,5 +1,4 @@
-// TODO: FARC zone
-// TODO: terror markers
+// TODO: show selected op spaces with highlight / pawn ?
// Factions
const GOVT = 0
@@ -231,10 +230,10 @@ 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)
+ register_action(ui.resources[GOVT], "resources", GOVT)
+ register_action(ui.resources[FARC], "resources", FARC)
+ register_action(ui.resources[AUC], "resources", AUC)
+ register_action(ui.resources[CARTELS], "resources", CARTELS)
for (let i = 0; i < data.spaces.length; ++i) {
let id = data.spaces[i].id
@@ -654,10 +653,10 @@ 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.resources[GOVT].classList.toggle("action", is_action("resources", GOVT))
+ ui.resources[FARC].classList.toggle("action", is_action("resources", FARC))
+ ui.resources[AUC].classList.toggle("action", is_action("resources", AUC))
+ ui.resources[CARTELS].classList.toggle("action", is_action("resources", CARTELS))
ui.player[GOVT].classList.toggle("hide", view.scenario < 3)
ui.player[AUC].classList.toggle("hide", view.scenario < 4)
@@ -800,6 +799,8 @@ function on_update() {
else
for (let i = 0; i < ui.pieces.length; ++i)
ui.pieces[i].classList.remove("action")
+ for (let i = 0; i < ui.pieces.length; ++i)
+ ui.pieces[i].classList.toggle("selected", view.who === i)
action_button("remove", "Remove")
// menu trade