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:
WBHarry 2025-07-05 00:26:33 +02:00 committed by GitHub
parent 099a4576da
commit 9d76405221
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
203 changed files with 1556 additions and 2565 deletions

View file

@ -0,0 +1,34 @@
<section
class='tab {{tabs.actions.cssClass}} {{tabs.actions.id}}'
data-tab='{{tabs.actions.id}}'
data-group='{{tabs.actions.group}}'
>
<button class="add-action-btn" data-action="addAction">
New Action
</button>
<fieldset>
<legend>{{localize tabs.actions.label}}</legend>
<ul class="action-list">
{{#each document.system.actions as |action index|}}
<li class="action-item">
<img src="{{action.img}}" alt="">
<div class="label">
<span>{{action.name}}</span>
<div class="tags">
<div class="tag">
{{localize (concat 'DAGGERHEART.Actions.Types.' action.type '.name')}}
</div>
<div class="tag">
{{localize (concat 'DAGGERHEART.ActionType.' action.actionType)}}
</div>
</div>
</div>
<div class="controls">
<a data-action="editAction" data-index="{{index}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.edit'}}"><i class="fa-solid fa-pen-to-square"></i></a>
<a data-action="removeAction" data-index="{{index}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.delete'}}"><i class="fa-solid fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</fieldset>
</section>

View file

@ -0,0 +1,23 @@
<section
class="tab {{tabs.attack.cssClass}} {{tabs.attack.id}}"
data-tab="{{tabs.attack.id}}"
data-group="{{tabs.attack.group}}"
>
<fieldset class="one-column">
<legend>{{localize "DAGGERHEART.General.basics"}}</legend>
{{formGroup systemFields.attack.fields.img value=document.system.attack.img label="Image Path" name="system.attack.img"}}
{{formGroup systemFields.attack.fields.name value=document.system.attack.name label="Attack Name" name="system.attack.name"}}
</fieldset>
<fieldset class="flex">
<legend>{{localize "DAGGERHEART.Sheets.Adversary.Attack"}}</legend>
{{formField systemFields.attack.fields.roll.fields.bonus value=document.system.attack.roll.bonus label="Attack Bonus" name="system.attack.roll.bonus"}}
{{formField systemFields.attack.fields.range value=document.system.attack.range label="Range" name="system.attack.range" localize=true}}
{{#if systemFields.attack.fields.target.fields}}
{{ formField systemFields.attack.fields.target.fields.type value=document.system.attack.target.type label="Target" name="system.attack.target.type" localize=true }}
{{#if (and document.system.attack.target.type (not (eq document.system.attack.target.type 'self')))}}
{{ formField systemFields.attack.fields.target.fields.amount value=document.system.attack.target.amount label="Amount" name="system.attack.target.amount" }}
{{/if}}
{{/if}}
</fieldset>
{{> 'systems/daggerheart/templates/actionTypes/damage.hbs' fields=systemFields.attack.fields.damage.fields.parts.element.fields source=document.system.attack.damage path="system.attack."}}
</section>

View file

@ -0,0 +1,38 @@
<section
class='tab {{tabs.details.cssClass}} {{tabs.details.id}}'
data-tab='{{tabs.details.id}}'
data-group='{{tabs.details.group}}'
>
<fieldset class="one-column">
<legend>{{localize 'DAGGERHEART.General.basics'}}</legend>
<div class="nest-inputs">
{{formGroup systemFields.tier value=document.system.tier localize=true}}
{{formGroup systemFields.type value=document.system.type localize=true}}
{{#if (eq document.system.type 'horde')}}
{{formGroup systemFields.hordeHp value=document.system.hordeHp label=(localize "DAGGERHEART.Sheets.Adversary.horderHp")}}
{{/if}}
{{formGroup systemFields.difficulty value=document.system.difficulty localize=true}}
</div>
{{formField systemFields.description value=document.system.description label=(localize "DAGGERHEART.Sheets.Adversary.FIELDS.description.label")}}
{{formField systemFields.motivesAndTactics value=document.system.motivesAndTactics label=(localize "DAGGERHEART.Sheets.Adversary.FIELDS.motivesAndTactics.label")}}
</fieldset>
<div class="fieldsets-section">
<fieldset class="flex">
<legend>{{localize "DAGGERHEART.Sheets.Adversary.HitPoints"}}</legend>
{{formGroup systemFields.resources.fields.hitPoints.fields.value value=document.system.resources.hitPoints.value}}
{{formGroup systemFields.resources.fields.hitPoints.fields.max value=document.system.resources.hitPoints.max}}
</fieldset>
<fieldset class="flex">
<legend>{{localize "DAGGERHEART.Sheets.Adversary.Stress"}}</legend>
{{formGroup systemFields.resources.fields.stress.fields.value value=document.system.resources.stress.value}}
{{formGroup systemFields.resources.fields.stress.fields.max value=document.system.resources.stress.max}}
</fieldset>
</div>
<fieldset class="flex">
<legend>{{localize "DAGGERHEART.Sheets.Adversary.DamageThresholds"}}</legend>
{{formGroup systemFields.damageThresholds.fields.major value=document.system.damageThresholds.major}}
{{formGroup systemFields.damageThresholds.fields.severe value=document.system.damageThresholds.severe}}
</fieldset>
</section>

View file

@ -0,0 +1,23 @@
<section
class='tab {{tabs.experiences.cssClass}} {{tabs.experiences.id}}'
data-tab='{{tabs.experiences.id}}'
data-group='{{tabs.experiences.group}}'
>
<button class="add-experience-btn" type="button" data-action="addExperience">
<span>New Experience</span>
</button>
<fieldset>
<legend>{{localize tabs.experiences.label}}</legend>
<ul class="experience-list">
{{#each document.system.experiences as |experience key|}}
<li class="experience-item">
<input class="name" type="text" name="system.experiences.{{key}}.name" value="{{experience.name}}" />
<input class="modifier" type="text" name="system.experiences.{{key}}.modifier" value="{{experience.modifier}}" data-dtype="Number" />
<a data-action="removeExperience" data-experience="{{key}}" data-tooltip="{{localize 'DAGGERHEART.Tooltip.delete'}}"><i class="fa-solid fa-trash"></i></a>
</li>
{{/each}}
</ul>
</fieldset>
</section>

View file

@ -0,0 +1,3 @@
<header class="dialog-header">
<h1>{{document.name}}</h1>
</header>