Skip to content

Commit a543230

Browse files
authored
Minor and cosmetic fixes (#157)
* Add fields and dependency for the bug-reporter module. Closes #152. * Reorder saves on upper level sheets. Closes #151. * Rework Halfling two weapon fighting description on the sheet. Closes #149. * Remove actor name from damage and healing chat cards since the token name is at the top of the card. Closes #146. * Fix Skill sheet description size and other item sheet issues. Replaced item header fields with flexrows (grid caused some layout problems). Spell Mercurial Magic and Description now both resize if necessary. Closes #143. * Update download link to be v0.0.22-preview-4.
1 parent 4877858 commit a543230

File tree

8 files changed

+47
-18
lines changed

8 files changed

+47
-18
lines changed

lang/en.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,10 @@
268268
"DCC.HalflingAbilities": "Halfling Skills",
269269
"DCC.HalflingTwoWeaponActionDie": "Action dice d16+d16",
270270
"DCC.HalflingTwoWeaponCrit": "Crit on nat 16",
271-
"DCC.HalflingTwoWeaponFumble": "Fumble only on 2x 1",
272-
"DCC.HalflingTwoWeaponHighAg": "If Agi > 16 use normal rules",
271+
"DCC.HalflingTwoWeaponFumble": "Fumble only on double 1",
272+
"DCC.HalflingTwoWeaponHighAg": "If Agi > 16 use normal rules",
273273
"DCC.HandlePoison": "Handle Poison",
274-
"DCC.HealDamage": "{target} is healed for {damage} HP.",
274+
"DCC.HealDamage": "Healed for {damage} HP.",
275275
"DCC.Healing": "Healing",
276276
"DCC.Health": "Health",
277277
"DCC.HealthFormula": "Health Formula",
@@ -537,7 +537,7 @@
537537
"DCC.SkillUseDie": "Use Die",
538538
"DCC.SkillUseValue": "Use Modifier",
539539
"DCC.SkillValue": "Modifier",
540-
"DCC.TakeDamage": "{target} takes {damage} HP of damage.",
540+
"DCC.TakeDamage": "Takes {damage} HP of damage.",
541541
"DCC.Target": "Target",
542542
"DCC.TargetAlly": "Ally",
543543
"DCC.TargetCone": "Cone",

module/actor-sheet.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@ class DCCActorSheet extends ActorSheet {
7373
this.options.template = 'systems/dcc/templates/actor-sheet-npc.html'
7474
} else {
7575
this.options.template = 'systems/dcc/templates/actor-sheet-zero-level.html'
76+
77+
if (!data.isZero) {
78+
// Reorder saves on upper level sheet to define tabbing order
79+
data.data.saves = {
80+
ref: data.data.saves.ref,
81+
frt: data.data.saves.frt,
82+
wil: data.data.saves.wil
83+
}
84+
}
7685
}
7786

7887
// Prepare item lists by type

styles/dcc.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,14 +1099,20 @@
10991099
.dcc.item .sheet-body.spell {
11001100
display: grid;
11011101
grid-template-columns: 3fr 1fr 2fr;
1102-
grid-template-rows: 60px 50px minmax(80px, auto) 50px 80px; }
1102+
grid-template-rows: 60px 50px minmax(80px, auto) 50px minmax(80px, auto); }
11031103

11041104
.dcc.item .sheet-body.treasure {
11051105
width: 100%;
11061106
display: grid;
11071107
grid-template-columns: 100%;
11081108
grid-template-rows: 85px 50px minmax(80px, auto); }
11091109

1110+
.dcc.item .sheet-body.skill {
1111+
width: 100%;
1112+
display: grid;
1113+
grid-template-columns: 100%;
1114+
grid-template-rows: 50px minmax(80px, auto); }
1115+
11101116
.dcc.item .value-row {
11111117
height: 150px;
11121118
display: flex;

styles/dcc.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1287,7 +1287,7 @@ $border-style: 2px groove #eeede0;
12871287
.sheet-body.spell {
12881288
display: grid;
12891289
grid-template-columns: 3fr 1fr 2fr;
1290-
grid-template-rows: 60px 50px minmax(80px, auto) 50px 80px;
1290+
grid-template-rows: 60px 50px minmax(80px, auto) 50px minmax(80px, auto);
12911291
}
12921292

12931293
.sheet-body.treasure {
@@ -1297,6 +1297,13 @@ $border-style: 2px groove #eeede0;
12971297
grid-template-rows: 85px 50px minmax(80px, auto);
12981298
}
12991299

1300+
.sheet-body.skill {
1301+
width: 100%;
1302+
display: grid;
1303+
grid-template-columns: 100%;
1304+
grid-template-rows: 50px minmax(80px, auto);
1305+
}
1306+
13001307
.value-row {
13011308
height: 150px;
13021309
display: flex;

system.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
"templateVersion": 4,
99
"author": "Tim L. White",
1010
"contributors": { "name" : "Steve Barnett", "email" : "[email protected]" },
11+
"dependencies": [
12+
{
13+
"name": "bug-reporter"
14+
}
15+
],
1116
"esmodules": [
1217
"module/dcc.js"
1318
],
@@ -38,6 +43,8 @@
3843
"initiative": "1d20 + @attributes.init.value",
3944
"url": "https://github.com/cyface/foundryvtt-dcc",
4045
"manifest": "https://github.com/cyface/foundryvtt-dcc/raw/preview_v0.0.22/system.json",
41-
"download": "https://github.com/cyface/foundryvtt-dcc/archive/v0.0.22-preview.3.zip",
46+
"download": "https://github.com/cyface/foundryvtt-dcc/archive/v0.0.22-preview.4.zip",
47+
"bugs": "https://github.com/foundryvtt-dcc/foundryvtt-dcc/issues",
48+
"allowBugReporter": true,
4249
"license": "LICENSE.txt"
4350
}

templates/item-partial-header.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ <h1 class="item-name charname"><input name="name" type="text" value="{{item.name
77
</div>
88
<label class="item-type" for="name">{{localize item.data.typeString}}</label>
99
</div>
10-
<div class="grid grid-2col">
11-
<div class="resource">
10+
<div class="flexrow">
11+
<div class="resource flex1">
1212
<label class="resource-label">{{localize "DCC.Quantity"}}</label>
1313
<input type="text" name="data.quantity" value="{{data.quantity}}" data-dtype="Number"/>
1414
</div>
15-
<div class="resource">
15+
<div class="resource flex1">
1616
<label class="resource-label">{{localize "DCC.Weight"}}</label>
1717
<input type="text" name="data.weight" value="{{data.weight}}" data-dtype="Number"/>
1818
</div>

templates/item-sheet-skill.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ <h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeh
1616
data-dtype="String"/>
1717
</div>
1818
{{else}}
19-
<div class="grid grid-3col">
20-
<div class="resource">
19+
<div class="flexrow">
20+
<div class="resource flex1">
2121
<label class="resource-label">{{localize "DCC.SkillAbility"}}</label>
2222
<div>
2323
<select name="data.ability" id="data.ability"
@@ -33,13 +33,13 @@ <h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeh
3333
</select>
3434
</div>
3535
</div>
36-
<div class="resource">
36+
<div class="resource flex1">
3737
<label class="resource-label">{{localize "DCC.SkillDie"}}</label>
3838
<input type="text" name="data.die" value="{{data.die}}"
3939
{{#if data.config.useDie}}{{else}}disabled{{/if}}
4040
data-dtype="String"/>
4141
</div>
42-
<div class="resource">
42+
<div class="resource flex1">
4343
<label class="resource-label">{{localize "DCC.SkillValue"}}</label>
4444
<input type="text" name="data.value"
4545
value="{{numberFormat data.value decimals=0 sign=true}}"
@@ -51,7 +51,7 @@ <h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeh
5151
</div>
5252
</header>
5353

54-
<section class="sheet-body item">
54+
<section class="sheet-body skill">
5555
<h1 class="description-heading">{{localize "DCC.Description"}}</h1>
5656
<div class="description">
5757
{{editor content=data.description.value target="data.description.value" button=true owner=owner editable=editable}}

templates/item-sheet-spell.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ <h1 class="charname"><input name="name" type="text" value="{{item.name}}" placeh
99
<label class="item-type" for="name">{{localize item.data.typeString}}</label>
1010
</div>
1111

12-
<div class="grid grid-2col">
13-
<div class="resource">
12+
<div class="flexrow">
13+
<div class="resource flex1">
1414
<label class="resource-label" for="data.level">{{localize "DCC.SpellLevel"}}</label>
1515
<input type="text" name="data.level"
1616
value="{{numberFormat data.level decimals=0 sign=false}}"
1717
placeholder="1" data-dtype="Number"/>
1818
</div>
19-
<div class="resource">
19+
<div class="resource flex1">
2020
<label class="resource-label" for="data.spellCheck.modifier">{{localize "DCC.SpellCheck"}}</label>
2121
<div class="flexrow">
2222
<input type="text" name="data.spellCheck.die" class="flex1"

0 commit comments

Comments
 (0)