summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-10-30 19:55:42 +0100
committerTor Andersson <tor@ccxvii.net>2023-10-30 20:00:36 +0100
commitac488293534d3861e2f7cdf125e0721e3c21af52 (patch)
tree3916e4900145408fa2d22ab54bda67786f2d0b5e
parent6883fc1c9bb0630d83049582942e8ac3348bcaef (diff)
downloadalgeria-ac488293534d3861e2f7cdf125e0721e3c21af52.tar.gz
deselect/undo for scenario setup deployment
-rw-r--r--rules.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index 3a1a3ab..96ca689 100644
--- a/rules.js
+++ b/rules.js
@@ -1592,6 +1592,8 @@ states.scenario_setup = {
gen_action_loc(loc)
})
}
+
+ view.actions.undo = 1
}
view.actions.end_deployment = !count
@@ -1604,6 +1606,12 @@ states.scenario_setup = {
let deployment = current_player_quick_setup()
setup_units(deployment)
},
+ undo() {
+ if (game.selected.length > 0)
+ set_clear(game.selected)
+ else
+ pop_undo()
+ },
unit(u) {
set_toggle(game.selected, u)
},