Remove angle brackets around default text, round carried weight to the nearest tenth of a pound, wider equipment count box

This commit is contained in:
James Fleming
2022-02-20 18:44:16 -05:00
parent 6a6212f835
commit 5cb257e787
+13 -10
View File
@@ -170,7 +170,7 @@
</div>
<fieldset class=repeating_talents>
<div class=sheet-flex-section>
<input type=text name=attr_talentname class=sheet-flex placeholder="<Talent Name>">
<input type=text name=attr_talentname class=sheet-flex placeholder="Talent Name">
&nbsp;
<button class="sheet-describe-button" title="Describe the talent." type="action" name="act_describe"/>
<button class="sheet-expand-button" title="Expand and edit more fields." type="action" name="act_expand"/>
@@ -245,7 +245,7 @@
<div class=sheet-flex-section>
<input type="checkbox" class="sheet-select-radio" name="attr_selection-flag" hidden>
<button type="action" class=sheet-select-button title="Select this Weapon for Attack!" name="act_select"/>
<input type=text name=attr_weaponname style='width: 13rem;' placeholder="<Weapon Name>">
<input type=text name=attr_weaponname style='width: 13rem;' placeholder="Weapon Name">
<input type=text name=attr_weapondamage style='width: 6rem;'>
<input type=text name=attr_tohit style='width: 4rem;'>
<input type=text name=attr_weaponnotes class=sheet-flex>
@@ -259,9 +259,9 @@
<input type="checkbox" name="attr_options-flag" class="sheet-toggle" hidden>
<div class="sheet-toggle-checked sheet-expanded">
<span title="Text shown following the character name when attacking, optional.">Attack Flavor Text:</span>
<input type=text name="attr_attackflavor" style='display: block; width:100%' placeholder="<swings his mighty war axe.>">
<input type=text name="attr_attackflavor" style='display: block; width:100%' placeholder="swings his mighty war axe.">
<span title="Text shown when the attack hits, optional.">Success Flavor Text:</span>
<input type=text name="attr_successflavor" style='display: block; width:100%' placeholder="<The axe hits with a sickening crunch!>">
<input type=text name="attr_successflavor" style='display: block; width:100%' placeholder="The axe hits with a sickening crunch!">
<span title="Details about the weapon, quoted with the Describe button.">Description:</span>
<textarea class=sheet-text-area spellcheck="false" name="attr_description"></textarea>
</div>
@@ -285,7 +285,7 @@
<div class=sheet-flex-section>
<input type="checkbox" class="sheet-select-radio" name="attr_selection-flag" hidden>
<button title="Select this Spell for casting." class=sheet-select-button type="action" name="act_select"/>
<input type=text name=attr_spellname style='width: 13rem;' placeholder="<Spell Name>">
<input type=text name=attr_spellname style='width: 13rem;' placeholder="Spell Name">
<input type=text name=attr_spelldamage style='width: 6rem;'>
<input type=text name=attr_tohit style='width: 4rem;'>
<input type=text name=attr_stcost style='width: 7rem;'>
@@ -314,7 +314,7 @@
</div>
<div>
<span title="Text that displays when the spell succeeds, optional.">Flavor Text:</span>
<input type=text name="attr_successflavor" style='display: block; width:100%' placeholder="<A giant wolf appears.>">
<input type=text name="attr_successflavor" style='display: block; width:100%' placeholder="A giant wolf appears.">
</div>
<div title="Description that shows when you click the Describe button.">Description:</div>
<textarea class=sheet-text-area spellcheck="false" name="attr_description"></textarea>
@@ -339,7 +339,7 @@
</div>
<fieldset class=repeating_armor>
<div class=sheet-flex-section>
<input type=text name=attr_defensename value="" style='width: 13rem;' placeholder="<Armor/Shield Type>">
<input type=text name=attr_defensename value="" style='width: 13rem;' placeholder="Armor/Shield Type">
<input type=text name=attr_hitsblocked value="0" style='width: 5rem;'>
<input type=text name=attr_minustohit value="0" style='width: 5rem;'>
<input type=text name=attr_dexpenalty value="0" style='width: 5rem;'>
@@ -360,7 +360,7 @@
<div class="sheet-equip sheet-block">
<div class='sheet-fieldset-header sheet-flex-section'>
<span class=sheet-first-word style='width: 13rem'>Equipment</span>
<span style='width: 5rem;'>Count</span>
<span style='width: 8rem;'>Count</span>
<span class=sheet-flex>Notes</span>
<span style='width: 4rem;' title="Weight per item.">Lbs</span>
<span style='position: relative;' title="Not carried, won't count as weight.">
@@ -373,8 +373,8 @@
</div>
<fieldset class=repeating_equipment>
<div class=sheet-flex-section>
<input type=text name=attr_name style='width: 13rem;' placeholder="<Equipment Name>">
<input type=number name=attr_count value="1" style='width: 5rem;'>
<input type=text name=attr_name style='width: 13rem;' placeholder="Equipment Name">
<input type=number name=attr_count value="1" style='width: 8rem;'>
<input type=text name=attr_notes class=sheet-flex>
<input type=text name=attr_weight value="" style='width: 4rem;'>
<input type=checkbox name=attr_notcarried value="1" class=sheet-flex-checkbox>
@@ -1534,6 +1534,9 @@
}
}
// Round to the nearest tenth.
totalWeight = Math.floor(totalWeight * 10 + .5) / 10;
let finalDex = (parseInt(v.dx_max)||0) + (parseInt(v.dx_adj)||0) - dexPenalty;
let penalty = '';
let finalMA = (parseInt(v.ma_max)||0) + (parseInt(v.ma_adj)||0);