Changed so that players can see each others actionTokens but can't interact with others. (#355)

This commit is contained in:
WBHarry 2025-07-16 20:20:09 +02:00 committed by GitHub
parent b40d053201
commit 3176438293
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 11 deletions

View file

@ -2,7 +2,6 @@
.token-actions { .token-actions {
align-self: stretch; align-self: stretch;
display: flex; display: flex;
align-items: top;
justify-content: center; justify-content: center;
gap: 16px; gap: 16px;
@ -26,6 +25,16 @@
opacity: 0.5; opacity: 0.5;
background: transparent; background: transparent;
} }
&.inactive {
background: var(--color-warm-2);
color: var(--color-light-1);
cursor: default;
&:hover {
filter: none;
}
}
} }
} }

View file

@ -31,16 +31,17 @@
</div> </div>
{{#if ../combat.round}} {{#if ../combat.round}}
<div class="token-actions"> <div class="token-actions">
{{#if isOwner}} {{#if (and (not isNPC) ../actionTokens.enabled)}}
{{#if (and (not isNPC) ../actionTokens.enabled)}} <div class="action-tokens">
<div class="action-tokens"> {{#times ../actionTokens.tokens}}
{{#times ../actionTokens.tokens}} <button
<button type="button" class="inline-control main icon fa-solid fa-bolt-lightning action-token {{#if (lte ../system/actionTokens this)}}used{{/if}}" data-action="setActionTokens" data-combatant-id="{{../id}}" data-token-index="{{this}}"> type="button" class="inline-control main icon fa-solid fa-bolt-lightning action-token {{#unless ../isOwner}}inactive{{/unless}} {{#if (lte ../system/actionTokens this)}}used{{/if}}" {{#if ../isOwner}}
</button> data-action="setActionTokens"{{/if}} data-combatant-id="{{../id}}" data-token-index="{{this}}" {{#unless ../isOwner}}disabled{{/unless}}
{{/times}} >
</div> </button>
{{/if}} {{/times}}
</div>
{{/if}} {{/if}}
</div> </div>
{{/if}} {{/if}}