Roster table: town column
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
842ceaa10e
commit
70ecc54606
3 changed files with 9 additions and 4 deletions
3
game.py
3
game.py
|
|
@ -7787,6 +7787,9 @@ ORDER_RECIPES, ORDER_RAW = _order_sources()
|
|||
# What changed, shown on the Patch notes page. Newest first; every shipped change adds a
|
||||
# line here (new / balance / fix), and a new release a new entry on top.
|
||||
PATCH_NOTES = [
|
||||
{"date": "2026-11-04", "title": "Roster", "notes": [
|
||||
("new", "Roster table shows each player's town."),
|
||||
]},
|
||||
{"date": "2026-11-04", "title": "Icons", "notes": [
|
||||
("new", "Icons replace emoji across the game. Your own board messages stay as typed."),
|
||||
]},
|
||||
|
|
|
|||
|
|
@ -2925,6 +2925,7 @@ function skillGroups(cls) {
|
|||
}
|
||||
|
||||
const rosterSub = (p) => `${p.look?.title ? `<span class="title">${esc(p.look.title)}</span> · ` : ""}${C.classes[p.cls].icon} ${C.classes[p.cls].name}`;
|
||||
const rosterTown = (p) => p.travel ? `<span title="On the road to ${esc(townName(p.travel))}">🛤️ ${esc(townName(p.travel))}</span>` : esc(townName(p.at));
|
||||
const rosterDoing = (p) => p.doing ? `${skillOf(p.skill).icon} <span class="grow">${esc(p.doing)}</span>` : `<span class="grow muted">Idle</span>`;
|
||||
|
||||
function rosterCards(players) {
|
||||
|
|
@ -2960,6 +2961,7 @@ function rosterTable(players) {
|
|||
<td class="left"><div class="who-cell"><span class="avatar">${crest(p.look, 30)}${presence(p)}</span>
|
||||
<div><button class="who" data-nav="character:${esc(p.id)}" title="Character sheet">${esc(p.name)}</button><div class="small muted">${rosterSub(p)}${lastSeen(p)}</div></div></div></td>
|
||||
<td class="total">${p.total}</td>
|
||||
<td class="left town-col small">${rosterTown(p)}</td>
|
||||
<td class="left doing-col"><div class="doing small">${rosterDoing(p)}${p.garrison ? `<span class="tag warn" title="On guard">🛡️</span>` : ""}${joinButton(p)}</div></td>
|
||||
${skills.map((s) => {
|
||||
const lvl = p.levels[s.id];
|
||||
|
|
@ -2967,8 +2969,8 @@ function rosterTable(players) {
|
|||
}).join("")}
|
||||
<td class="favour">${fmt(p.donated)}</td></tr>`).join("");
|
||||
return `<div class="panel roster-table"><table>
|
||||
<thead><tr><th colspan="2"></th><th class="doing-col"></th>${groups.map(([name, list]) => `<th class="grp sep" colspan="${list.length}">${esc(name)}</th>`).join("")}<th></th></tr>
|
||||
<tr><th class="left">Player</th><th>Total</th><th class="left doing-col">Doing</th>${skills.map((s) => `<th class="${sep(s)}" title="${s.name}">${s.icon}</th>`).join("")}<th class="favour" title="Given to the city">${FAVOUR}</th></tr></thead>
|
||||
<thead><tr><th colspan="2"></th><th class="town-col"></th><th class="doing-col"></th>${groups.map(([name, list]) => `<th class="grp sep" colspan="${list.length}">${esc(name)}</th>`).join("")}<th></th></tr>
|
||||
<tr><th class="left">Player</th><th>Total</th><th class="left town-col">Town</th><th class="left doing-col">Doing</th>${skills.map((s) => `<th class="${sep(s)}" title="${s.name}">${s.icon}</th>`).join("")}<th class="favour" title="Given to the city">${FAVOUR}</th></tr></thead>
|
||||
<tbody>${rows}</tbody></table></div>`;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -375,10 +375,10 @@ button.who { background: none; border: 0; padding: 0; font-weight: 700; text-ali
|
|||
.roster-table td.favour, .roster-table th.favour { text-align: right; }
|
||||
.who-cell, .roster-table .doing { display: flex; align-items: center; gap: 8px; }
|
||||
.who-cell { gap: 10px; min-width: 170px; }
|
||||
/* Phone: crest and name only, no Doing column, so the skills get the room. */
|
||||
/* Phone: crest and name only, no Town or Doing column, so the skills get the room. */
|
||||
@media (max-width: 700px) {
|
||||
.roster-table { padding: 4px 8px; }
|
||||
.roster-table .doing-col, .who-cell .small { display: none; }
|
||||
.roster-table .town-col, .roster-table .doing-col, .who-cell .small { display: none; }
|
||||
.who-cell { min-width: 0; gap: 6px; }
|
||||
.roster-table td, .roster-table th { padding-left: 3px; padding-right: 3px; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue