diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-11-06 01:50:54 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-11-06 01:50:54 +0100 |
commit | 19a042610fafc45e5949337d662a9cf8a702e28e (patch) | |
tree | 825f606d248f280fe9931ad6b8914ecab1531e4f | |
parent | 45d9112c08af8540cf80c19467b52684eea41f40 (diff) | |
download | maria-19a042610fafc45e5949337d662a9cf8a702e28e.tar.gz |
Revert "WIP subsidy list"
This reverts commit 45d9112c08af8540cf80c19467b52684eea41f40.
-rw-r--r-- | play.html | 1 | ||||
-rw-r--r-- | play.js | 20 |
2 files changed, 0 insertions, 21 deletions
@@ -124,7 +124,6 @@ <div id="pc_show" style="display:flex;flex-wrap:wrap;gap:18px;"> </div> </div> - <div class="deal" id="subsidy_list"></div> <div class="deal" id="active_deal_list"></div> <div class="deal" id="proposed_deal_list"></div> </div> @@ -1539,7 +1539,6 @@ function on_update() { "propose_deal", ]) - update_subsidy_list(view.contracts, window.subsidy_list, "Active Subsidies") update_deal_list(view.deals, window.active_deal_list, "Active Deals") if (view.proposed_deal) { update_deal_list([ view.proposed_deal ], window.proposed_deal_list, "Proposed Deal") @@ -1715,25 +1714,6 @@ function html_escape(str) { return str.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">") } -function update_subsidy_list(subs, elt, title) { - let show = false - let str = "<table><tr><th colspan=3>" + title - for (let from of all_major_powers) { - map_for_each(subs[from], (to, n) => { - show = true - str += "<tr><td width=24>" + power_image[from] - str += "<td width=24>" + power_image[to] - str += "<td>" + n + " TC" - }) - } - if (show) { - elt.innerHTML = str - elt.style.display = "block" - } else { - elt.style.display = "none" - } -} - function update_deal_item(deal) { let [ turn, a_power, b_power, a_promise, b_promise ] = deal let str = "<tr>" |