mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 04:31:07 +01:00
[Feature] Summon Action Implementation (#1514)
* Schema definition for DHSummonAction * Will reimplement * HBS idea formed. Need to recheck drag drop implementation * Tried to refine drag drop * drag drop implemented (css tbd) * phase 1 complete * tbd work on summon action type * Improved Schema and now it works * . * Dialog created. Tokens not dragged(tbd). * Bare minimum implementation * Finalized functionality * Cleanup * . * Added optional summon render to chat message * Updated SRD * bugfix: fix title lines not rendering in chat messages * Added summon actions to the easily doable environments in the SRD * Update module/data/fields/action/summonField.mjs Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com> --------- Co-authored-by: Nikhil Nagarajan <potter.nikhil@gmail.com> Co-authored-by: Murilo Brito <dev.murilobrito@gmail.com> Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com>
This commit is contained in:
parent
d823501d91
commit
d282a81594
44 changed files with 902 additions and 312 deletions
50
templates/actionTypes/summon.hbs
Normal file
50
templates/actionTypes/summon.hbs
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<fieldset class="one-column" id="summon-drop-zone" data-key="summon">
|
||||
<legend>
|
||||
{{localize "DAGGERHEART.ACTIONS.TYPES.summon.name"}}
|
||||
</legend>
|
||||
|
||||
<ul class="actor-summon-items">
|
||||
{{#each @root.summons as |summon index|}}
|
||||
<li class="actor-summon-line">
|
||||
<div class="actor-summon-name">
|
||||
<img class="image" src="{{summon.actor.img}}" />
|
||||
<h4 class="h4">
|
||||
{{summon.actor.name}}
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="actor-summon-controls">
|
||||
<div class="form-group summon-count-wrapper" data-index="{{index}}">
|
||||
<div class="form-fields">
|
||||
<input type="text" value="{{summon.count}}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="controls">
|
||||
<a
|
||||
class='effect-control'
|
||||
data-action='editDoc'
|
||||
data-item-uuid="{{summon.actor.uuid}}"
|
||||
data-tooltip='{{localize "DAGGERHEART.UI.Tooltip.openItemWorld"}}'
|
||||
>
|
||||
<i class="fa-solid fa-globe"></i>
|
||||
</a>
|
||||
<a
|
||||
class='effect-control'
|
||||
data-action='removeElement'
|
||||
data-target="summon"
|
||||
data-uuid="{{summon.actor.uuid}}"
|
||||
data-index="{{index}}"
|
||||
data-tooltip='{{localize "CONTROLS.CommonDelete"}}'
|
||||
>
|
||||
<i class='fas fa-trash'></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/each}}
|
||||
<div class="summon-dragger">
|
||||
<span>{{localize "DAGGERHEART.ACTIONS.Settings.summon.dropSummonsHere"}}</span>
|
||||
</div>
|
||||
</ul>
|
||||
</fieldset>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
class="tab {{this.tabs.config.cssClass}}"
|
||||
data-group="primary"
|
||||
data-tab="config"
|
||||
>
|
||||
>
|
||||
{{> 'systems/daggerheart/templates/actionTypes/uses.hbs' fields=fields.uses.fields source=source.uses}}
|
||||
{{> 'systems/daggerheart/templates/actionTypes/cost.hbs' fields=fields.cost.element.fields source=source.cost costOptions=costOptions}}
|
||||
{{> 'systems/daggerheart/templates/actionTypes/range-target.hbs' fields=(object range=fields.range target=fields.target.fields) source=(object target=source.target range=source.range)}}
|
||||
|
|
|
|||
|
|
@ -9,5 +9,6 @@
|
|||
{{#if fields.macro}}{{> 'systems/daggerheart/templates/actionTypes/macro.hbs' fields=fields.macro source=source.macro}}{{/if}}
|
||||
{{#if fields.effects}}{{> 'systems/daggerheart/templates/actionTypes/effect.hbs' fields=fields.effects.element.fields source=source.effects}}{{/if}}
|
||||
{{#if fields.beastform}}{{> 'systems/daggerheart/templates/actionTypes/beastform.hbs' fields=fields.beastform.fields source=source.beastform}}{{/if}}
|
||||
{{#if fields.summon}}{{> 'systems/daggerheart/templates/actionTypes/summon.hbs' fields=fields.summon.element.fields source=source.summon}}{{/if}}
|
||||
{{#if fields.countdown}}{{> 'systems/daggerheart/templates/actionTypes/countdown.hbs' fields=fields.countdown.element.fields source=source.countdown}}{{/if}}
|
||||
</section>
|
||||
|
|
@ -8,6 +8,22 @@
|
|||
</div>
|
||||
<i class="fa-solid fa-chevron-down"></i>
|
||||
</summary>
|
||||
<div class="description">{{{description}}}</div>
|
||||
<div class="description">
|
||||
{{{description}}}
|
||||
{{#if action.summon}}
|
||||
<div class="summons-header"><span>{{localize "DAGGERHEART.GENERAL.summon.plural"}}</span></div>
|
||||
<div class="summons-container">
|
||||
{{#each action.summon}}
|
||||
<div class="summon-container">
|
||||
<div class="summon-label-container">
|
||||
<img src="{{this.actor.img}}" />
|
||||
<label>{{this.actor.name}}</label>
|
||||
</div>
|
||||
<span># {{this.rolledCount}}</span>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue