From ac488293534d3861e2f7cdf125e0721e3c21af52 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 30 Oct 2023 19:55:42 +0100 Subject: deselect/undo for scenario setup deployment --- rules.js | 8 ++++++++ 1 file changed, 8 insertions(+) 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) }, -- cgit v1.2.3