diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-10-16 12:21:33 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-10-16 12:21:33 +0200 |
commit | 227dca6e6e4c2f2d5a16527507810bc373b758ec (patch) | |
tree | c1284345f1116e42d7e15c8e7bc6cde684f35df9 /play.js | |
parent | 55927b36e1f17183c6f63b3b106d838e5a0c15de (diff) | |
download | red-flag-over-paris-227dca6e6e4c2f2d5a16527507810bc373b758ec.tar.gz |
Add special panels for Karl Marx and Jules Ducatel events.
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -527,6 +527,8 @@ function on_update() { ui.military_vp.className = `piece cylinder purple vp${5+view.military_vp}` ui.political_vp.className = `piece cylinder orange vp${5+view.political_vp}` + document.getElementById("karl_marx").replaceChildren() + document.getElementById("jules_ducatel").replaceChildren() document.getElementById("hand").replaceChildren() document.getElementById("final").replaceChildren() document.getElementById("discard").replaceChildren() @@ -546,6 +548,26 @@ function on_update() { if (view.discard) document.getElementById("discard").appendChild(ui.cards[view.discard]) + if (view.karl_marx || view.jules_ducatel) { + document.getElementById("event_grid").style.display = null + if (view.karl_marx) { + document.getElementById("karl_marx_panel").classList.remove("hide") + for (let c of view.karl_marx) + document.getElementById("karl_marx").appendChild(ui.cards[c]) + } else { + document.getElementById("karl_marx_panel").classList.add("hide") + } + if (view.jules_ducatel) { + document.getElementById("jules_ducatel_panel").classList.remove("hide") + for (let c of view.jules_ducatel) + document.getElementById("jules_ducatel").appendChild(ui.cards[c]) + } else { + document.getElementById("jules_ducatel_panel").classList.add("hide") + } + } else { + document.getElementById("event_grid").style.display = "none" + } + if (view.hand) { document.getElementById("hand_panel").classList.remove("hide") for (let c of view.hand) |