diff options
author | Frans Bongers <fransbongers@franss-mbp.home> | 2024-12-24 21:34:48 +0100 |
---|---|---|
committer | Frans Bongers <fransbongers@franss-mbp.home> | 2024-12-24 21:34:48 +0100 |
commit | 5dc1ee327e16431b6700f3977469943f002a0c7c (patch) | |
tree | b5ad0d3fe88f5f5c1ad216f13237956070606279 /play.ts | |
parent | 357cf90cb0e56060dc3ebac92325f3792502e757 (diff) | |
download | land-and-freedom-5dc1ee327e16431b6700f3977469943f002a0c7c.tar.gz |
show initiative token
Diffstat (limited to 'play.ts')
-rw-r--r-- | play.ts | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -83,6 +83,7 @@ const ui = { tokens_on_front: {}, // front_values: {}, glory: [], + initiative_token: undefined, medallions: [], spaces: [], standees: [], @@ -306,6 +307,10 @@ function on_init() { register_action(e, 'card', c); } + // create initiative marker + let e = (ui.initiative_token = document.createElement('div')); + e.className = 'initiative_token'; + // create tokens to add to fronts data.fronts.forEach((front) => { ui.tokens_on_front[front.id] = {}; @@ -408,6 +413,8 @@ function on_update() { ui.roles[f].medallions.appendChild(ui.medallions[m]); } } + ui.roles[view.initiative].medallions.appendChild(ui.initiative_token); + ui.initiative_token.setAttribute('data-year', view.year); for (let faction_id of FACTIONS) { ui.tableaus[faction_id].replaceChildren(); |