improved importer to detect attack features and actions
This commit is contained in:
parent
bbf4ecbc87
commit
74f123ecf2
4 changed files with 304 additions and 61 deletions
|
|
@ -2,16 +2,34 @@
|
|||
<div class="actor-list">
|
||||
{{#each parsedData as |actor idx|}}
|
||||
<div class="actor-preview">
|
||||
<h3>
|
||||
<span>{{actor.name}}</span>
|
||||
<small>Tier {{actor.system.tier}} {{actor.system.type}}</small>
|
||||
</h3>
|
||||
<div class="header-row">
|
||||
<div class="image-picker">
|
||||
<img src="{{actor.img}}" data-edit="img.{{actor.name}}" height="48" width="48" />
|
||||
<input type="text" name="img.{{actor.name}}" value="{{actor.img}}" style="display:none">
|
||||
</div>
|
||||
<h3>
|
||||
<span>{{actor.name}}</span>
|
||||
<small>Tier {{actor.system.tier}} {{actor.system.type}}</small>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="stats">
|
||||
{{#if actor.system.resources.hitPoints.max}}<span><strong>HP:</strong>
|
||||
{{actor.system.resources.hitPoints.max}}</span>{{/if}}
|
||||
{{#if actor.system.resources.stress.max}}<span><strong>Stress:</strong>
|
||||
{{actor.system.resources.stress.max}}</span>{{/if}}
|
||||
<span><strong>Difficulty:</strong> {{actor.system.difficulty}}</span>
|
||||
{{#if actor.system.attack.name}}
|
||||
{{#if actor.system.attack.name}}
|
||||
<span class="attack-pill">
|
||||
<div class="image-picker small" style="border:none; margin-right:5px; width:24px; height:24px;">
|
||||
<img src="icons/svg/item-bag.svg" data-edit="attackImg.{{actor.name}}" height="24" width="24" />
|
||||
<input type="text" name="attackImg.{{actor.name}}" value="icons/svg/item-bag.svg"
|
||||
style="display:none">
|
||||
</div>
|
||||
<strong>Attack:</strong> {{actor.system.attack.name}}
|
||||
</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class="features-list">
|
||||
|
|
@ -20,7 +38,15 @@
|
|||
{{#each actor.items as |item itemIdx|}}
|
||||
{{#if (eq item.type "feature")}}
|
||||
<li class="feature-item">
|
||||
<strong>{{item.name}}</strong>
|
||||
<div class="feature-header">
|
||||
<div class="image-picker small">
|
||||
<img src="{{item.img}}" data-edit="itemImg.{{actor.name}}.{{item.name}}" height="24"
|
||||
width="24" />
|
||||
<input type="text" name="itemImg.{{actor.name}}.{{item.name}}" value="{{item.img}}"
|
||||
style="display:none">
|
||||
</div>
|
||||
<strong>{{item.name}}</strong>
|
||||
</div>
|
||||
|
||||
{{#if (lookup ../foundFeatures item.name)}}
|
||||
<div class="feature-match">
|
||||
|
|
@ -40,6 +66,12 @@
|
|||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="actor-options">
|
||||
<label>
|
||||
<input type="checkbox" name="openSheet.{{actor.name}}"> Open Sheet after Import
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue