summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-11-27 14:09:57 +0100
committerMischa Untaga <99098079+MischaU8@users.noreply.github.com>2023-11-27 14:09:57 +0100
commit53e7c53467c9e6084356d651f877c85347f9d890 (patch)
tree4b4aeab6f6a4252056eee1f102b2a41547987e0e
parent6dde02078731db314e187238a40487447acbacbc (diff)
downloadvotes-for-women-53e7c53467c9e6084356d651f877c85347f9d890.tar.gz
Create toggle for Purple / Yellow cube color selection
-rw-r--r--rules.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/rules.js b/rules.js
index cef860a..8a167e2 100644
--- a/rules.js
+++ b/rules.js
@@ -2278,12 +2278,13 @@ states.vm_add_cubes = {
inactive: "add a cube.",
prompt() {
if (game.vm.cubes === PURPLE_OR_YELLOW) {
- gen_action("purple")
- gen_action("yellow")
+ view.actions.purple = (game.vm.cube_color !== PURPLE)
+ view.actions.yellow = (game.vm.cube_color !== YELLOW)
// Alternatively allow a click on a campaigner to switch color
for_each_player_campaigner(c => {
- gen_action_campaigner(c)
+ if (game.vm.cube_color !== campaigner_color(c))
+ gen_action_campaigner(c)
})
}