summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-09-03 15:05:31 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 13:11:27 +0100
commitc1b934d988f7e21d28ec0b84e2792e638fab2b31 (patch)
treef118ce0f17bee48cd9c22295004ce477f26bf058
parent5930acada41dcaea28781a61194f76dc3a0133ec (diff)
downloadrommel-in-the-desert-c1b934d988f7e21d28ec0b84e2792e638fab2b31.tar.gz
Close stack by clicking inactive units in open stack.
-rw-r--r--play.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/play.js b/play.js
index a87abbb..76edae8 100644
--- a/play.js
+++ b/play.js
@@ -292,7 +292,8 @@ function on_click_unit(evt) {
hide_supply()
evt.stopPropagation()
if (focus_stack(evt.target.stack, evt.target.hex))
- send_action('unit', evt.target.unit)
+ if (!send_action('unit', evt.target.unit))
+ blur_stack()
}
}