summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-05-06 19:26:38 +0200
committerTor Andersson <tor@ccxvii.net>2023-05-06 19:26:38 +0200
commitdaef2be2f11d1fdf264610426bbcadc3ffdd552a (patch)
tree1a096d797af0ab9c98345bc6088bdbbc47d6f64a
parent0cfed806d5bfd949169ddefc4552712729787dc7 (diff)
downloadandean-abyss-daef2be2f11d1fdf264610426bbcadc3ffdd552a.tar.gz
Only clear undo when selecting another faction.
-rw-r--r--rules.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/rules.js b/rules.js
index 47d45c4..92dbad7 100644
--- a/rules.js
+++ b/rules.js
@@ -7173,25 +7173,29 @@ states.vm_current = {
view.actions.cartels = 1
},
govt() {
- clear_undo()
+ if (game.current !== GOVT)
+ clear_undo()
game.current = GOVT
log_transfer(faction_name[game.current] + "...")
vm_next()
},
farc() {
- clear_undo()
+ if (game.current !== FARC)
+ clear_undo()
game.current = FARC
log_transfer(faction_name[game.current] + "...")
vm_next()
},
auc() {
- clear_undo()
+ if (game.current !== AUC)
+ clear_undo()
game.current = AUC
log_transfer(faction_name[game.current] + "...")
vm_next()
},
cartels() {
- clear_undo()
+ if (game.current !== CARTELS)
+ clear_undo()
game.current = CARTELS
log_transfer(faction_name[game.current] + "...")
vm_next()