The carried-treasure dot becomes the owner's chest
A gold dot said 'carrying' but never whose. The badge on the carrier's shoulder is now the treasure owner's colored chest — always the drawn SVG chest, which stays legible at badge size in either art mode. The dot survives only as a fallback for a treasure the view cannot resolve. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0138A8CjeQRpvzKxuMfz1Bqc
This commit is contained in:
co-authored by
Claude Fable 5
parent
3dcdf50498
commit
4a5baed853
@@ -533,8 +533,20 @@
|
|||||||
<text x="0" y="4" class="wizard-label">{p.id[0]?.toUpperCase()}</text>
|
<text x="0" y="4" class="wizard-label">{p.id[0]?.toUpperCase()}</text>
|
||||||
{/if}
|
{/if}
|
||||||
{#if p.carriedTreasureId}
|
{#if p.carriedTreasureId}
|
||||||
|
{@const carriedT = view.treasures.find((t) => t.id === p.carriedTreasureId)}
|
||||||
|
{#if carriedT}
|
||||||
|
<!-- Whose gold: the owner's chest rides the carrier's shoulder.
|
||||||
|
Always the drawn chest — legible at badge size, either art mode. -->
|
||||||
|
<TokenArt
|
||||||
|
href={`/tokens-svg/treasure-${sharedColorIndex(view, carriedT.owner) % 6}.svg`}
|
||||||
|
x={CELL * 0.10} y={CELL * 0.06}
|
||||||
|
width={CELL * 0.36} height={CELL * 0.36}
|
||||||
|
cls="carried-chest"
|
||||||
|
/>
|
||||||
|
{:else}
|
||||||
<circle cx={CELL * 0.26} cy={CELL * 0.26} r={5} class="carried" />
|
<circle cx={CELL * 0.26} cy={CELL * 0.26} r={5} class="carried" />
|
||||||
{/if}
|
{/if}
|
||||||
|
{/if}
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</g>
|
||||||
{/each}
|
{/each}
|
||||||
@@ -834,6 +846,10 @@
|
|||||||
text-anchor: middle; pointer-events: none;
|
text-anchor: middle; pointer-events: none;
|
||||||
}
|
}
|
||||||
.carried { fill: gold; stroke: #111; stroke-width: 1; }
|
.carried { fill: gold; stroke: #111; stroke-width: 1; }
|
||||||
|
:global(.carried-chest) {
|
||||||
|
filter: drop-shadow(0.5px 1px 1px rgba(0, 0, 0, 0.55));
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
.crack {
|
.crack {
|
||||||
stroke: #efe8d4;
|
stroke: #efe8d4;
|
||||||
stroke-width: 2;
|
stroke-width: 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user