mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +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
14
templates/actionTypes/actionType.hbs
Normal file
14
templates/actionTypes/actionType.hbs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<form id="action-type-select">
|
||||
<ul class="unlist list-select">
|
||||
{{#each types}}
|
||||
<li>
|
||||
<label>
|
||||
{{! TODO: remove dh-icon}}
|
||||
<dh-icon class="dh-icon fas {{icon}}"></dh-icon>
|
||||
<span>{{localize name}}</span>
|
||||
<input type="radio" name="type" value="{{id}}" {{#if (eq @index 0)}}checked{{/if}}>
|
||||
</label>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</form>
|
||||
17
templates/actionTypes/beastform.hbs
Normal file
17
templates/actionTypes/beastform.hbs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<fieldset class="action-category">
|
||||
<legend class="action-category-label">
|
||||
<div>{{localize "DAGGERHEART.Actions.Config.Beastform.label"}}</div>
|
||||
</legend>
|
||||
|
||||
<div class="action-category-data open">
|
||||
<div class="hint-group">
|
||||
<div class="form-fields">
|
||||
<label>{{localize "DAGGERHEART.Actions.Config.Beastform.exact"}}</label>
|
||||
<select name="beastform.tierAccess.exact" data-dtype="Number">
|
||||
{{selectOptions tierOptions selected=@root.source.beastform.tierAccess.exact labelAttr="label" valueAttr="key" blank="" }}
|
||||
</select>
|
||||
</div>
|
||||
<p class="hint">{{localize "DAGGERHEART.Actions.Config.Beastform.exactHint"}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
21
templates/actionTypes/cost.hbs
Normal file
21
templates/actionTypes/cost.hbs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="cost">
|
||||
<div>Cost</div>
|
||||
</legend>
|
||||
<div class="action-category-data open" data-key="cost">
|
||||
<div class="fas fa-plus icon-button" data-action="addElement"></div>
|
||||
{{#each source as |cost index|}}
|
||||
<fieldset>
|
||||
<div class="multi-display">
|
||||
{{formField ../fields.type choices=(@root.disableOption index ../fields.type.choices ../source) label="Resource" value=cost.type name=(concat "cost." index ".type") localize=true}}
|
||||
{{formField ../fields.value label="Value" value=cost.value name=(concat "cost." index ".value")}}
|
||||
</div>
|
||||
<div class="multi-display">
|
||||
{{formField ../fields.scalable label="Scalable" value=cost.scalable name=(concat "cost." index ".scalable")}}
|
||||
{{formField ../fields.step label="Step" value=cost.step name=(concat "cost." index ".step")}}
|
||||
</div>
|
||||
<div class="fas fa-trash" data-action="removeElement" data-index="{{index}}"></div>
|
||||
</fieldset>
|
||||
{{/each}}
|
||||
</div>
|
||||
</fieldset>
|
||||
71
templates/actionTypes/damage.hbs
Normal file
71
templates/actionTypes/damage.hbs
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
|
||||
<fieldset class="flex wrap">
|
||||
<legend>Damage</legend>
|
||||
{{#unless (eq path 'system.attack.')}}
|
||||
<div class="fas fa-plus icon-button" data-action="addDamage"></div>
|
||||
{{/unless}}
|
||||
{{#unless @root.isNPC}}
|
||||
{{#if @root.hasBaseDamage}}
|
||||
<div>
|
||||
{{formField @root.fields.damage.fields.includeBase value=@root.source.damage.includeBase label="Include Item Damage" name="damage.includeBase" }}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/unless}}
|
||||
{{#each source.parts as |dmg index|}}
|
||||
{{#if @root.isNPC}}
|
||||
{{formField ../fields.value.fields.custom.fields.enabled value=dmg.value.custom.enabled name=(concat ../path "damage.parts." index ".value.custom.enabled") classes="checkbox"}}
|
||||
<input type="hidden" name="{{../path}}damage.parts.{{index}}.value.multiplier" value="{{dmg.value.multiplier}}">
|
||||
{{#if dmg.value.custom.enabled}}
|
||||
{{formField ../fields.value.fields.custom.fields.formula value=dmg.value.custom.formula name=(concat ../path "damage.parts." index ".value.custom.formula") localize=true}}
|
||||
{{else}}
|
||||
{{formField ../fields.value.fields.flatMultiplier value=dmg.value.flatMultiplier name=(concat ../path "damage.parts." index ".value.flatMultiplier") label="Multiplier" classes="inline-child" }}
|
||||
{{formField ../fields.value.fields.dice value=dmg.value.dice name=(concat ../path "damage.parts." index ".value.dice") classes="inline-child"}}
|
||||
{{formField ../fields.value.fields.bonus value=dmg.value.bonus name=(concat ../path "damage.parts." index ".value.bonus") localize=true classes="inline-child"}}
|
||||
{{/if}}
|
||||
{{formField ../fields.type value=dmg.type name=(concat ../path "damage.parts." index ".type") localize=true}}
|
||||
{{else}}
|
||||
{{#with (@root.getRealIndex index) as | realIndex |}}
|
||||
<fieldset{{#if dmg.base}} disabled{{/if}}>
|
||||
{{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base))}}
|
||||
{{formField ../../fields.resultBased value=dmg.resultBased name=(concat "damage.parts." realIndex ".resultBased") localize=true}}
|
||||
{{/if}}
|
||||
{{#if (and (not @root.isNPC) @root.hasRoll (not dmg.base) dmg.resultBased)}}
|
||||
<fieldset>
|
||||
<legend>
|
||||
<div>With Hope</div>
|
||||
</legend>
|
||||
{{> formula fields=../../fields.value.fields type=../../fields.type dmg=dmg source=dmg.value target="value" realIndex=realIndex}}
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<div>With Fear</div>
|
||||
</legend>
|
||||
{{> formula fields=../../fields.valueAlt.fields type=../../fields.type dmg=dmg source=dmg.valueAlt target="valueAlt" realIndex=realIndex}}
|
||||
</fieldset>
|
||||
{{else}}
|
||||
{{> formula fields=../../fields.value.fields type=../fields.type dmg=dmg source=dmg.value target="value" realIndex=realIndex}}
|
||||
{{/if}}
|
||||
{{formField ../../fields.type value=dmg.type name=(concat "damage.parts." realIndex ".type") localize=true}}
|
||||
<input type="hidden" name="damage.parts.{{realIndex}}.base" value="{{dmg.base}}">
|
||||
{{#unless dmg.base}}<div class="fas fa-trash" data-action="removeDamage" data-index="{{realIndex}}"></div>{{/unless}}
|
||||
</fieldset>
|
||||
{{/with}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</fieldset>
|
||||
|
||||
{{#*inline "formula"}}
|
||||
{{#unless dmg.base}}
|
||||
{{formField fields.custom.fields.enabled value=source.custom.enabled name=(concat "damage.parts." realIndex "." target ".custom.enabled")}}
|
||||
{{/unless}}
|
||||
{{#if source.custom.enabled}}
|
||||
{{formField fields.custom.fields.formula value=source.custom.formula name=(concat "damage.parts." realIndex "." target ".custom.formula") localize=true}}
|
||||
{{else}}
|
||||
<div class="multi-display">
|
||||
{{formField fields.multiplier value=source.multiplier name=(concat "damage.parts." realIndex "." target ".multiplier") localize=true}}
|
||||
{{#if (eq source.multiplier 'flat')}}{{formField fields.flatMultiplier value=source.flatMultiplier name=(concat "damage.parts." realIndex ".flatMultiplier") }}{{/if}}
|
||||
{{formField fields.dice value=source.dice name=(concat "damage.parts." realIndex "." target ".dice")}}
|
||||
{{formField fields.bonus value=source.bonus name=(concat "damage.parts." realIndex "." target ".bonus") localize=true}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/inline}}
|
||||
35
templates/actionTypes/effect.hbs
Normal file
35
templates/actionTypes/effect.hbs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="effects">
|
||||
<div>Effects</div>
|
||||
</legend>
|
||||
<div class="action-category-data open" data-key="effects">
|
||||
<div class="fas fa-plus icon-button" data-action="addEffect"></div>
|
||||
{{!-- {{#each @root.effects as | effect index | }}
|
||||
<fieldset>
|
||||
<div class="multi-display">
|
||||
<div class="form-group">
|
||||
<img src="{{img}}">
|
||||
<label data-action="editEffect">{{name}}</label>
|
||||
<div class="fas fa-trash" data-action="removeEffect" data-index="{{index}}"></div>
|
||||
</div>
|
||||
{{formfield }}
|
||||
</div>
|
||||
</fieldset>
|
||||
{{/each}} --}}
|
||||
{{#each source as | effect index |}}
|
||||
<fieldset data-effect-id="{{effect._id}}">
|
||||
<div class="multi-display">
|
||||
{{#with (@root.getEffectDetails effect._id) as | details |}}
|
||||
<div class="form-group" data-action="editEffect">
|
||||
<img src="{{img}}">
|
||||
<label>{{name}}</label>
|
||||
<div class="fas fa-trash" data-action="removeEffect" data-index="{{index}}"></div>
|
||||
</div>
|
||||
{{/with}}
|
||||
<input type="hidden" name="effects.{{index}}._id" value="{{effect._id}}">
|
||||
{{formField ../fields.onSave value=effect.onSave name=(concat "effects." index ".onSave")}}
|
||||
</div>
|
||||
</fieldset>
|
||||
{{/each}}
|
||||
</div>
|
||||
</fieldset>
|
||||
43
templates/actionTypes/healing.hbs
Normal file
43
templates/actionTypes/healing.hbs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
|
||||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="effects">
|
||||
<div>Healing</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
<fieldset>
|
||||
{{formField fields.type value=source.type name="healing.type" localize=true}}
|
||||
{{#if (and (not @root.isNPC) @root.hasRoll)}}
|
||||
{{formField fields.resultBased value=source.resultBased name="healing.resultBased" localize=true}}
|
||||
{{/if}}
|
||||
{{#if (and (not @root.isNPC) @root.hasRoll source.resultBased)}}
|
||||
<fieldset>
|
||||
<legend>
|
||||
<div>With Hope</div>
|
||||
</legend>
|
||||
{{> formula fields=fields.value.fields source=source.value target="value"}}
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>
|
||||
<div>With Fear</div>
|
||||
</legend>
|
||||
{{> formula fields=fields.valueAlt.fields source=source.valueAlt target="valueAlt"}}
|
||||
</fieldset>
|
||||
{{else}}
|
||||
{{> formula fields=fields.value.fields source=source.value target="value"}}
|
||||
{{/if}}
|
||||
</fieldset>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
{{#*inline "formula"}}
|
||||
<div class="multi-display">
|
||||
{{formField fields.custom.fields.enabled value=source.custom.enabled name=(concat "healing." target ".custom.enabled")}}
|
||||
{{#if source.custom.enabled}}
|
||||
{{formField fields.custom.fields.formula value=source.custom.formula name=(concat "healing." target ".custom.formula") localize=true}}
|
||||
{{else}}
|
||||
{{formField fields.multiplier value=source.multiplier name=(concat "healing." target ".multiplier") localize=true}}
|
||||
{{formField fields.dice value=source.dice name=(concat "healing." target ".dice")}}
|
||||
{{formField fields.bonus value=source.bonus name=(concat "healing." target ".bonus") localize=true}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/inline}}
|
||||
18
templates/actionTypes/range-target.hbs
Normal file
18
templates/actionTypes/range-target.hbs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="range">
|
||||
<div>Range{{#if fields.target}} & Target{{/if}}</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
{{formField fields.range value=source.range label="Range" name=(concat path "range") localize=true}}
|
||||
</div>
|
||||
{{#if fields.target}}
|
||||
<div class="action-category-data open">
|
||||
<div class="multi-display">
|
||||
{{#if (and source.target.type (not (eq source.target.type 'self')))}}
|
||||
{{ formField fields.target.amount value=source.target.amount label="Amount" name=(concat path "target.amount") }}
|
||||
{{/if}}
|
||||
{{ formField fields.target.type value=source.target.type label="Target" name=(concat path "target.type") localize=true }}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</fieldset>
|
||||
14
templates/actionTypes/resource.hbs
Normal file
14
templates/actionTypes/resource.hbs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="effects">
|
||||
<div>Resource</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
<fieldset>
|
||||
<div class="multi-display">
|
||||
{{formField fields.type value=source.type name="resource.type" localize=true}}
|
||||
{{formField fields.value value=source.value name="resource.value"}}
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</fieldset>
|
||||
31
templates/actionTypes/roll.hbs
Normal file
31
templates/actionTypes/roll.hbs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="roll">
|
||||
<div>Roll</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
{{#if @root.isNPC}}
|
||||
{{formField fields.bonus label="Bonus" name="roll.bonus" value=source.bonus}}
|
||||
{{else}}
|
||||
{{formField fields.type label="Type" name="roll.type" value=source.type localize=true}}
|
||||
{{#if (eq source.type "diceSet")}}
|
||||
<div class="multi-display">
|
||||
{{formField fields.diceRolling.fields.multiplier name="roll.diceRolling.multiplier" value=source.diceRolling.multiplier localize=true}}
|
||||
{{#if (eq source.diceRolling.multiplier 'flat')}}{{formField fields.diceRolling.fields.flatMultiplier value=source.diceRolling.flatMultiplier name="roll.diceRolling.flatMultiplier" }}{{/if}}
|
||||
{{formField fields.diceRolling.fields.dice name="roll.diceRolling.dice" value=source.diceRolling.dice}}
|
||||
</div>
|
||||
<div class="multi-display">
|
||||
{{formField fields.diceRolling.fields.compare name="roll.diceRolling.compare" value=source.diceRolling.compare localize=true}}
|
||||
{{formField fields.diceRolling.fields.treshold name="roll.diceRolling.treshold" value=source.diceRolling.treshold localize=true}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="multi-display">
|
||||
{{formField fields.trait label="Trait" name="roll.trait" value=source.trait localize=true disabled=(not source.type)}}
|
||||
{{formField fields.difficulty label="Difficulty" name="roll.difficulty" value=source.difficulty disabled=(not source.type)}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{#unless (eq source.type "diceSet")}}
|
||||
{{formField fields.advState label= "Advantage State" name="roll.advState" value=source.advState localize=true}}
|
||||
{{/unless}}
|
||||
</div>
|
||||
</fieldset>
|
||||
10
templates/actionTypes/save.hbs
Normal file
10
templates/actionTypes/save.hbs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="roll">
|
||||
<div>Save</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
{{formField fields.trait label="Trait" name="save.trait" value=source.trait localize=true}}
|
||||
{{formField fields.difficulty label="Difficulty" name="save.difficulty" value=source.difficulty disabled=(not source.trait)}}
|
||||
{{formField fields.damageMod label="Damage on Save" name="save.damageMod" value=source.damageMod localize=true disabled=(not source.trait)}}
|
||||
</div>
|
||||
</fieldset>
|
||||
8
templates/actionTypes/target.hbs
Normal file
8
templates/actionTypes/target.hbs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="target">
|
||||
<div>Target</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
{{formField targetField.type label="Target" name="target" rootId=partId localize=true}}
|
||||
</div>
|
||||
</fieldset>
|
||||
12
templates/actionTypes/uses.hbs
Normal file
12
templates/actionTypes/uses.hbs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="uses">
|
||||
<div>Uses</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
<div class="multi-display">
|
||||
{{formField fields.value label="Value" value=source.value name="uses.value" rootId=partId}}
|
||||
{{formField fields.max label="Max" value=source.max name="uses.max" rootId=partId}}
|
||||
</div>
|
||||
{{formField fields.recovery label="Recovery" value=source.recovery name="uses.recovery" rootId=partId localize=true}}
|
||||
</div>
|
||||
</fieldset>
|
||||
9
templates/actionTypes/uuid.hbs
Normal file
9
templates/actionTypes/uuid.hbs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
<fieldset class="action-category">
|
||||
<legend class="action-category-label" data-action="toggleSection" data-section="effects">
|
||||
<div>Macro</div>
|
||||
</legend>
|
||||
<div class="action-category-data open">
|
||||
{{formInput fields value=source name="documentUUID" placeholder=fields.options.placeholder}}
|
||||
</div>
|
||||
</fieldset>
|
||||
Loading…
Add table
Add a link
Reference in a new issue