diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-06-22 00:19:45 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-07-07 18:39:37 +0200 |
commit | ae5536113addb383cd411aad62688d513e43f861 (patch) | |
tree | 52af35e16c6e8b05937375e7336a6b967f64d74c /play.js | |
parent | 8dfe1166de298cb78b20132291649408693f82f1 (diff) | |
download | time-of-crisis-ae5536113addb383cd411aad62688d513e43f861.tar.gz |
Fix Militia + Castra interactions.
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -934,6 +934,11 @@ function on_update() { } for (let region = 0; region < 12; ++region) { + if (has_militia_castra(region)) + show(ui.mcastra[region]) + else + hide(ui.mcastra[region]) + if (has_militia(region)) { let lone_militia = true for (let pi = 0; pi < player_count; ++pi) { @@ -945,14 +950,10 @@ function on_update() { } } if (lone_militia) { - let mcastra = has_militia_castra(region) - if (mcastra) { - show(ui.mcastra[region]) + if (has_militia_castra(region)) layout_stack(-1, [ ui.mcastra[region], ui.militia[region] ], region, true, 16, 16) - } else { - hide(ui.mcastra[region]) + else layout_stack(-1, [ ui.militia[region] ], region, true, 16, 16) - } } } @@ -992,6 +993,9 @@ function on_update() { hide(ui.castra[pi][ai]) } + if (has_militia_castra(region) && inside) + stack.push(ui.mcastra[region]) + stack.push(e) for (let i = 0; i < 33; ++i) { |