Update to dnd 0.98 Core with some fixes

Updated to 0.98 core for 0.7.x compatability (untested)

Class Skills are pulling in automatically on class item drop to character sheet.

TODO: Expand automated skill drop for Archetypes

KNOWN ISSUE: init.value is being converted to a string causing some NaN errors on the html.  Initiative was changed to a number instead of a string in 0.98 likely some place is assuming it is still a string.  I had to use Number() on the value because it was forcing other vales to be a string because the value is "".  Maybe someone can fix this
This commit is contained in:
supervj 2020-10-08 02:20:12 -04:00
parent 4bed1d1869
commit 44312146a7
132 changed files with 748 additions and 1010 deletions

View file

@ -40,11 +40,9 @@
<li class="attribute health">
<h4 class="attribute-name box-title rollable">{{ localize "SW5E.Health" }}</h4>
<div class="attribute-value multiple">
<input name="data.attributes.hp.value" type="text" value="{{data.attributes.hp.value}}"
data-dtype="Number" placeholder="10"/>
<input name="data.attributes.hp.value" type="text" value="{{data.attributes.hp.value}}" placeholder="10" data-dtype="Number"/>
<span class="sep"> / </span>
<input name="data.attributes.hp.max" type="text" value="{{data.attributes.hp.max}}"
data-dtype="Number" placeholder="10"/>
<input name="data.attributes.hp.max" type="text" value="{{data.attributes.hp.max}}" placeholder="10" data-dtype="Number"/>
</div>
<footer class="attribute-footer">
<input name="data.attributes.hp.formula" class="hpformula" type="text" placeholder="{{ localize 'SW5E.HealthFormula' }}"
@ -55,8 +53,7 @@
<li class="attribute">
<h4 class="attribute-name box-title">{{ localize "SW5E.ArmorClass" }}</h4>
<div class="attribute-value">
<input name="data.attributes.ac.value" type="text" value="{{data.attributes.ac.value}}"
data-dtype="Number" placeholder="10"/>
<input name="data.attributes.ac.value" type="number" value="{{data.attributes.ac.value}}" placeholder="10"/>
</div>
<footer class="attribute-footer">
<span>{{ localize "SW5E.Proficiency" }}</span>
@ -96,7 +93,7 @@
{{#each data.abilities as |ability id|}}
<li class="ability {{#if ability.proficient}}proficient{{/if}}" data-ability="{{id}}">
<h4 class="ability-name box-title rollable">{{ability.label}}</h4>
<input class="ability-score" name="data.abilities.{{id}}.value" type="text" value="{{ability.value}}" data-dtype="Number" placeholder="10"/>
<input class="ability-score" name="data.abilities.{{id}}.value" type="number" value="{{ability.value}}" placeholder="10"/>
<div class="ability-modifiers flexrow">
<span class="ability-mod" title="Modifier">{{numberFormat ability.mod decimals=0 sign=true}}</span>
<input type="hidden" name="data.abilities.{{id}}.proficient" value="{{ability.proficient}}" data-dtype="Number"/>
@ -128,21 +125,17 @@
<div class="counter flexrow legendary">
<h4>{{ localize "SW5E.LegAct" }}</h4>
<div class="counter-value">
<input type="text" name="data.resources.legact.value" data-dtype="Number" placeholder="0"
value="{{data.resources.legact.value}}"/>
<input name="data.resources.legact.value" type="number" value="{{data.resources.legact.value}}" placeholder="0"/>
<span class="sep">/</span>
<input type="text" name="data.resources.legact.max" data-dtype="Number" placeholder="0"
value="{{data.resources.legact.max}}"/>
<input name="data.resources.legact.max" type="number" value="{{data.resources.legact.max}}" placeholder="0"/>
</div>
</div>
<div class="counter flexrow legendary">
<h4>{{ localize "SW5E.LegRes" }}</h4>
<div class="counter-value">
<input type="text" name="data.resources.legres.value" data-dtype="Number" placeholder="0"
value="{{data.resources.legres.value}}"/>
<input name="data.resources.legres.value" type="number" value="{{data.resources.legres.value}}" placeholder="0"/>
<span class="sep">/</span>
<input type="text" name="data.resources.legres.max" data-dtype="Number" placeholder="0"
value="{{data.resources.legres.max}}"/>
<input name="data.resources.legres.max" type="number" value="{{data.resources.legres.max}}" placeholder="0"/>
</div>
</div>
<div class="counter flexrow lair">
@ -150,8 +143,7 @@
<div class="counter-value">
<input name="data.resources.lair.value" type="checkbox" value="{{data.resources.lair.value}}"
data-dtype="Boolean" {{checked data.resources.lair.value}}/>
<input name="data.resources.lair.initiative" type="text" value="{{data.resources.lair.initiative}}"
data-dtype="Number" placeholder="Init."/>
<input name="data.resources.lair.initiative" type="number" value="{{data.resources.lair.initiative}}" placeholder="20"/>
</div>
</div>
</div>