Show the Watcher's bag only when it holds items and let expeditions bring back Parchemins d'oubli
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
477ce5a141
commit
e55c5c735d
8 changed files with 13 additions and 9 deletions
|
|
@ -50,9 +50,11 @@ function ItemBag({ catalog, state, view, content, busy, onBonus, onReroll, onCra
|
|||
const used = new Set(view.destinations.map((destination) => destination.bonusSlot).filter(Boolean));
|
||||
const actions = { guideStar: ["5", content.useGuideStar, 1], skyChart: ["6", content.useSkyChart, 1], fragment: ["hidden", content.useFragments, view.fragmentsForMap] };
|
||||
const owned = Object.entries(items).filter(([, count]) => count > 0);
|
||||
// Sans objet, pas de Sac du Veilleur.
|
||||
if (!owned.length) return null;
|
||||
return <section className="nds-panel nebula-expedition-bag" aria-labelledby="nebula-expedition-bag-title">
|
||||
<h3 id="nebula-expedition-bag-title">{content.bagTitle}</h3>
|
||||
{owned.length ? <ul>{owned.map(([id, count]) => {
|
||||
<ul>{owned.map(([id, count]) => {
|
||||
const action = actions[id];
|
||||
return <li key={id} className="nds-list-row">
|
||||
<span><strong>{content.items[id]}</strong> ×{count}<span className="nebula-form-help">{content.itemHelp[id]}</span></span>
|
||||
|
|
@ -61,7 +63,7 @@ function ItemBag({ catalog, state, view, content, busy, onBonus, onReroll, onCra
|
|||
{id === "plan" && view.atelierAvailable && <button className="nds-button" data-size="sm" data-variant="secondary" type="button" aria-pressed={crafting} disabled={busy} onClick={() => setCrafting(!crafting)}>{content.atelierOpen}</button>}
|
||||
{id === "plan" && crafting && <Atelier catalog={catalog} state={state} content={content} busy={busy} onCraft={async (ids) => { const done = await onCraft(ids); if (done) setCrafting(false); return done; }} />}
|
||||
</li>;
|
||||
})}</ul> : <p className="nebula-form-help">{content.bagEmpty}</p>}
|
||||
})}</ul>
|
||||
</section>;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,8 @@ export const EXPEDITION_SETTING_GROUPS = [
|
|||
{ path: "items.weights.anchor", label: "Poids : ancre des Veilleurs" },
|
||||
{ path: "items.weights.guideStar", label: "Poids : étoile guide (5e destination)" },
|
||||
{ path: "items.weights.skyChart", label: "Poids : carte céleste (6e destination)" },
|
||||
{ path: "items.weights.windRose", label: "Poids : rose des vents (nouvelles destinations du jour)" }
|
||||
{ path: "items.weights.windRose", label: "Poids : rose des vents (nouvelles destinations du jour)" },
|
||||
{ path: "items.weights.oblivion", label: "Poids : parchemin d’oubli (changer le plan d’une carte)" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue