mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
File Structure Rework (#262)
* Restructured all the files * Moved build/daggerheart.js to ./daggerheart.js. Changed rollup to use the css file instead of the less * Restored build/ folder * Mvoed config out form under application * Moved roll.mjs to module/dice and renamed to dhRolls.mjs * Update module/canvas/placeables/_module.mjs Co-authored-by: joaquinpereyra98 <24190917+joaquinpereyra98@users.noreply.github.com> * Le massive export update * Removed unncessary import --------- Co-authored-by: joaquinpereyra98 <24190917+joaquinpereyra98@users.noreply.github.com>
This commit is contained in:
parent
099a4576da
commit
9d76405221
203 changed files with 1556 additions and 2565 deletions
8
templates/ui/combatTracker/combatTracker.hbs
Normal file
8
templates/ui/combatTracker/combatTracker.hbs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<div class="combat-tracker">
|
||||
{{#if (gt this.characters.length 0)}}
|
||||
{{> 'systems/daggerheart/templates/ui/combat/combatTrackerSection.hbs' this title=(localize "DAGGERHEART.General.Character.Plural") turns=this.characters}}
|
||||
{{/if}}
|
||||
{{#if (gt this.adversaries.length 0)}}
|
||||
{{> 'systems/daggerheart/templates/ui/combat/combatTrackerSection.hbs' this title=(localize "DAGGERHEART.General.Adversary.Plural") turns=this.adversaries}}
|
||||
{{/if}}
|
||||
</div>
|
||||
17
templates/ui/combatTracker/combatTrackerFooter.hbs
Normal file
17
templates/ui/combatTracker/combatTrackerFooter.hbs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<nav class="combat-controls" data-tooltip-direction="UP">
|
||||
{{~#if hasCombat~}}
|
||||
{{#if user.isGM}}
|
||||
{{#if combat.round}}
|
||||
<button type="button" class="combat-control combat-control-lg" data-action="endCombat">
|
||||
<i class="fa-solid fa-xmark" inert></i>
|
||||
<span>{{ localize "COMBAT.End" }}</span>
|
||||
</button>
|
||||
{{else}}
|
||||
<button type="button" class="combat-control combat-control-lg" data-action="startCombat">
|
||||
<i class="fa-solid fa-swords" inert></i>
|
||||
<span>{{ localize "COMBAT.Begin" }}</span>
|
||||
</button>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</nav>
|
||||
91
templates/ui/combatTracker/combatTrackerHeader.hbs
Normal file
91
templates/ui/combatTracker/combatTrackerHeader.hbs
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
<header class="combat-tracker-header">
|
||||
|
||||
{{!-- Encounter Controls --}}
|
||||
{{#if user.isGM}}
|
||||
<nav class="encounters {{ css }}" aria-label="{{ localize "COMBAT.NavLabel" }}">
|
||||
|
||||
{{!-- Cycle Display --}}
|
||||
{{#if displayCycle}}
|
||||
<button type="button" class="inline-control icon fa-solid fa-plus" data-action="createCombat"
|
||||
data-tooltip aria-label="{{ localize "COMBAT.Create" }}"></button>
|
||||
|
||||
<div class="cycle-combats">
|
||||
<button type="button" class="inline-control icon fa-solid fa-caret-left" data-action="cycleCombat"
|
||||
{{#if previousId}}data-combat-id="{{ previousId }}" {{else}}disabled{{/if}}
|
||||
data-tooltip aria-label="{{ localize "COMBAT.EncounterPrevious" }}"></button>
|
||||
<div class="encounter-count">
|
||||
<span class="value">{{ currentIndex }}</span>
|
||||
<span class="separator">/</span>
|
||||
<span class="max">{{ combats.length }}</span>
|
||||
</div>
|
||||
<button type="button" class="inline-control icon fa-solid fa-caret-right" data-action="cycleCombat"
|
||||
{{#if nextId}}data-combat-id="{{ nextId }}" {{else}}disabled{{/if}}
|
||||
data-tooltip aria-label="{{ localize "COMBAT.EncounterNext" }}"></button>
|
||||
</div>
|
||||
|
||||
<button type="button" class="inline-control icon fa-solid fa-gear" data-action="trackerSettings"
|
||||
data-tooltip aria-label="{{ localize "COMBAT.Settings" }}"></button>
|
||||
|
||||
{{!-- Tabbed Display --}}
|
||||
{{else if combats.length}}
|
||||
<button type="button" class="inline-control icon fa-solid fa-plus" data-action="createCombat"
|
||||
data-tooltip aria-label="{{ localize "COMBAT.Create" }}"></button>
|
||||
{{#each combats}}
|
||||
<button type="button" class="inline-control {{#if active}}active{{/if}}" data-action="cycleCombat"
|
||||
data-combat-id="{{ id }}">
|
||||
{{ label }}
|
||||
</button>
|
||||
{{/each}}
|
||||
<button type="button" class="inline-control icon fa-solid fa-gear" data-action="trackerSettings"
|
||||
data-tooltip aria-label="{{ localize "COMBAT.Settings" }}"></button>
|
||||
|
||||
{{!-- No Combats --}}
|
||||
{{else}}
|
||||
<button type="button" class="combat-control-lg" data-action="createCombat">
|
||||
<i class="fa-solid fa-plus" inert></i>
|
||||
<span>{{ localize "COMBAT.Create" }}</span>
|
||||
</button>
|
||||
|
||||
{{/if}}
|
||||
</nav>
|
||||
{{/if}}
|
||||
|
||||
<div class="encounter-controls {{#if hasCombat}}combat{{/if}}">
|
||||
{{#if hasCombat}}
|
||||
<div class="encounter-fear-controls">
|
||||
<div class="encounter-fear-dice-container">
|
||||
<div class="encounter-control-fear-container">
|
||||
<img class="dice " src="../icons/svg/d12-grey.svg"/>
|
||||
<i class="fas fa-skull encounter-control-fear"></i>
|
||||
</div>
|
||||
<div>{{fear}}</div>
|
||||
</div>
|
||||
<a class="encounter-countdowns" data-tooltip="{{localize "DAGGERHEART.Countdown.Title" type=(localize "DAGGERHEART.Countdown.Types.combat")}}" data-action="openCountdowns"><i class="fa-solid fa-stopwatch"></i></a>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{!-- Combat Status --}}
|
||||
<strong class="encounter-title">
|
||||
{{#if combats.length}}
|
||||
{{#if combat.round}}
|
||||
{{ localize "DAGGERHEART.Combat.combatStarted" }}
|
||||
{{else}}
|
||||
{{ localize "COMBAT.NotStarted" }}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{ localize "COMBAT.None" }}
|
||||
{{/if}}
|
||||
</strong>
|
||||
|
||||
{{!-- Combat Controls --}}
|
||||
{{#if hasCombat}}
|
||||
<div class="control-buttons right flexrow">
|
||||
<div class="spacer"></div>
|
||||
<button type="button" class="encounter-context-menu inline-control combat-control icon fa-solid fa-ellipsis-vertical"
|
||||
{{#unless (and user.isGM hasCombat)}}disabled{{/unless}}></button>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
|
||||
</header>
|
||||
64
templates/ui/combatTracker/combatTrackerSection.hbs
Normal file
64
templates/ui/combatTracker/combatTrackerSection.hbs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
<div>
|
||||
<h4 class="divider">{{title}}</h4>
|
||||
<ol class="combat-tracker plain">
|
||||
{{#each turns}}
|
||||
<li class="combatant {{ css }}" data-combatant-id="{{ id }}" data-action="activateCombatant">
|
||||
{{!-- Image --}}
|
||||
<img class="token-image" src="{{ img }}" alt="{{ name }}" loading="lazy">
|
||||
|
||||
{{!-- Name & Controls --}}
|
||||
<div class="token-name">
|
||||
<strong class="name">{{ name }}</strong>
|
||||
<div class="flexrow">
|
||||
<div class="combatant-controls flex-0">
|
||||
{{#if @root.user.isGM}}
|
||||
<button type="button" class="inline-control combatant-control icon fa-solid fa-eye-slash {{#if hidden}}active{{/if}}"
|
||||
data-action="toggleHidden" data-tooltip aria-label="{{ localize "COMBAT.ToggleVis" }}"></button>
|
||||
<button type="button" class="inline-control combatant-control icon fa-solid fa-skull {{#if isDefeated}}active{{/if}}"
|
||||
data-action="toggleDefeated" data-tooltip
|
||||
aria-label="{{ localize "COMBAT.ToggleDead" }}"></button>
|
||||
{{/if}}
|
||||
{{#if canPing}}
|
||||
<button type="button" class="inline-control combatant-control icon fa-solid fa-bullseye-arrow"
|
||||
data-action="pingCombatant" data-tooltip
|
||||
aria-label="{{ localize "COMBAT.PingCombatant" }}"></button>
|
||||
{{/if}}
|
||||
{{#unless @root.user.isGM}}
|
||||
<button type="button" class="inline-control combatant-control icon fa-solid fa-arrows-to-eye"
|
||||
data-action="panToCombatant" data-tooltip
|
||||
aria-label="{{ localize "COMBAT.PanToCombatant" }}"></button>
|
||||
{{/unless}}
|
||||
</div>
|
||||
|
||||
{{#if ../combat.round}}
|
||||
<div class="token-actions">
|
||||
{{#if isOwner}}
|
||||
{{#if (and (not isNPC) ../actionTokens.enabled)}}
|
||||
<div class="action-tokens">
|
||||
{{#times ../actionTokens.tokens}}
|
||||
<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}}">
|
||||
</button>
|
||||
{{/times}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#if @root.user.isGM}}
|
||||
<button
|
||||
type="button" class="inline-control spotlight-control discrete icon fa-solid {{#if system.spotlight.requesting}}fa-hand-sparkles requesting{{else}}fa-hand{{/if}}"
|
||||
data-action="toggleSpotlight" data-combatant-id="{{id}}" data-tooltip aria-label="{{localize "DAGGERHEART.Combat.giveSpotlight"}}"
|
||||
></button>
|
||||
{{else}}
|
||||
<button
|
||||
type="button" class="inline-control spotlight-control discrete icon fa-solid {{#if system.spotlight.requesting}}fa-hand-sparkles requesting{{else}}fa-hand{{/if}}"
|
||||
data-action="requestSpotlight" data-combatant-id="{{id}}" data-tooltip aria-label="{{#if system.spotlight.requesting}}{{localize "DAGGERHEART.Combat.requestingSpotlight"}}{{else}}{{localize "DAGGERHEART.Combat.requestSpotlight"}}{{/if}}"
|
||||
></button>
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/each}}
|
||||
</ol>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue