Skip to content

Commit

Permalink
Release 5e system for 0.71 update
Browse files Browse the repository at this point in the history
  • Loading branch information
aaclayton committed Nov 21, 2019
1 parent 5d2ec1c commit 4a953a9
Show file tree
Hide file tree
Showing 13 changed files with 131 additions and 100 deletions.
47 changes: 28 additions & 19 deletions dnd5e.css
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,13 @@
}
.dnd5e.sheet .sheet-navigation {
flex: 0 0 30px;
margin-bottom: 10px;
margin-bottom: 5px;
font-family: "Nodesto", "Signika", "Palatino Linotype", serif;
font-size: 20px;
}
.dnd5e.sheet .sheet-navigation .item {
height: 30px;
line-height: 36px;
line-height: 32px;
margin: 0 24px;
border-bottom: 3px solid #b5b3a4;
}
Expand Down Expand Up @@ -426,11 +426,11 @@
}
.dnd5e.sheet.actor ul.attributes {
list-style: none;
margin: 10px 0 0;
margin: 5px 0 0;
padding: 0;
}
.dnd5e.sheet.actor ul.attributes li.attribute {
height: 80px;
height: 70px;
margin: 0 5px;
border: 2px groove #eeede0;
border-radius: 4px;
Expand All @@ -442,12 +442,13 @@
flex: 0 0 18px;
}
.dnd5e.sheet.actor ul.attributes li.attribute .attribute-value {
flex: 0 0 30px;
line-height: 30px;
height: 28px;
line-height: 28px;
}
.dnd5e.sheet.actor ul.attributes li.attribute .attribute-value input {
display: inline;
max-width: 80%;
height: 28px;
margin: 0;
font-size: 24px;
}
Expand All @@ -459,11 +460,12 @@
color: #7a7971;
}
.dnd5e.sheet.actor ul.attributes li.attribute .attribute-value.multiple input {
max-width: 40%;
max-width: 33%;
}
.dnd5e.sheet.actor ul.attributes li.attribute .attribute-footer {
flex: 0 0 20px;
line-height: 20px;
flex: 0 0 18px;
margin-top: -1px;
line-height: 18px;
font-family: "Signika", "Palatino Linotype", serif;
font-size: 12px;
}
Expand Down Expand Up @@ -527,19 +529,19 @@
.dnd5e.sheet.actor ul.skills-list {
flex: 0 0 192px;
list-style: none;
margin: 10px 5px 0;
margin: 5px 5px 0;
padding: 2px 2px 0;
border: 2px groove #eeede0;
border-radius: 3px;
}
.dnd5e.sheet.actor ul.skills-list li.skill {
height: 24px;
height: 22px;
padding: 3px 0;
}
.dnd5e.sheet.actor ul.skills-list li.skill h4 {
flex: 1px;
margin: 0;
font-size: 12px;
font-size: 11px;
line-height: 18px;
}
.dnd5e.sheet.actor ul.skills-list li.skill .skill-proficiency {
Expand Down Expand Up @@ -1072,8 +1074,8 @@
/* Basic Structure */
/* ----------------------------------------- */
.dnd5e.sheet.actor.character {
min-width: 700px;
min-height: 785px;
min-width: 672px;
min-height: 736px;
/* ----------------------------------------- */
/* Sheet Header */
/* ----------------------------------------- */
Expand Down Expand Up @@ -1121,9 +1123,11 @@
border-bottom: 2px groove #eeede0;
}
.dnd5e.sheet.actor.character .sheet-header .attributes {
height: 80px;
margin: 0;
}
.dnd5e.sheet.actor.character .sheet-header .attributes .attribute {
height: 80px;
margin: 0;
border: none;
border-right: 2px groove #eeede0;
Expand All @@ -1132,6 +1136,11 @@
.dnd5e.sheet.actor.character .sheet-header .attributes .attribute:last-child {
border-right: none;
}
.dnd5e.sheet.actor.character .sheet-header .attributes .attribute .attribute-value {
margin: 5px 0 0;
height: 32px;
line-height: 32px;
}
.dnd5e.sheet.actor.character .sheet-header .attributes .attribute .attribute-name {
margin-top: 6px;
}
Expand Down Expand Up @@ -1163,7 +1172,7 @@
width: 32px;
}
.dnd5e.sheet.actor.character ul.skills-list {
flex: 0 0 226px;
flex: 0 0 212px;
}
.dnd5e.sheet.actor.character ul.skills-list li.skill {
padding: 3px;
Expand All @@ -1177,7 +1186,7 @@
flex: 2;
}
.dnd5e.sheet.actor.character .counters .death-saves .counter-value {
flex: 0 0 120px;
flex: 0 0 90px;
}
.dnd5e.sheet.actor.character .item-detail.player-class {
flex: 0 0 180px;
Expand All @@ -1187,7 +1196,7 @@
.dnd5e.sheet.actor.character .encumbrance {
flex: 0 0 12px;
background: #7a7971;
margin: 1px 20px 5px 5px;
margin: 1px 15px 0 1px;
border: 1px solid #191813;
border-radius: 3px;
position: relative;
Expand Down Expand Up @@ -1252,6 +1261,6 @@
/* Basic Structure */
/* ----------------------------------------- */
.dnd5e.sheet.actor.npc {
min-width: 620px;
min-height: 705px;
min-width: 600px;
min-height: 658px;
}
6 changes: 3 additions & 3 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@
"DND5E.None": "None",
"DND5E.RestS": "S. Rest",
"DND5E.RestL": "L. Rest",
"DND5E.ResourcePrimary": "Primary Res.",
"DND5E.ResourceSecondary": "Secondary Res.",
"DND5E.ResourceTertiary": "Tertiary Res.",
"DND5E.ResourcePrimary": "Resource 1",
"DND5E.ResourceSecondary": "Resource 2",
"DND5E.ResourceTertiary": "Resource 3",
"DND5E.Senses": "Senses",
"DND5E.Save": "Save",
"DND5E.Size": "Size",
Expand Down
22 changes: 12 additions & 10 deletions less/actors.less
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@

ul.attributes {
list-style: none;
margin: 10px 0 0;
margin: 5px 0 0;
padding: 0;

li.attribute {
height: 80px;
height: 70px;
margin: 0 5px;
border: @borderGroove;
border-radius: 4px;
Expand All @@ -97,12 +97,13 @@
}

.attribute-value {
flex: 0 0 30px;
line-height: 30px;
height: 28px;
line-height: 28px;

input {
display: inline;
max-width: 80%;
height: 28px;
margin: 0;
font-size: 24px;
}
Expand All @@ -116,13 +117,14 @@
}

&.multiple {
input { max-width: 40%; }
input { max-width: 33%; }
}
}

.attribute-footer {
flex: 0 0 20px;
line-height: 20px;
flex: 0 0 18px;
margin-top: -1px;
line-height: 18px;
font-family: "Signika", "Palatino Linotype", serif;
font-size: 12px;
}
Expand Down Expand Up @@ -209,19 +211,19 @@
ul.skills-list {
flex: 0 0 192px;
list-style: none;
margin: 10px 5px 0;
margin: 5px 5px 0;
padding: 2px 2px 0;
border: @borderGroove;
border-radius: 3px;

li.skill {
height: 24px;
height: 22px;
padding: 3px 0;

h4 {
flex: 1px;
margin: 0;
font-size: 12px;
font-size: 11px;
line-height: 18px;
}

Expand Down
4 changes: 2 additions & 2 deletions less/apps.less
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,12 @@

.sheet-navigation {
flex: 0 0 @navHeight;
margin-bottom: 10px;
margin-bottom: 5px;
.nodesto();

.item {
height: 30px;
line-height: 36px;
line-height: 32px;
margin: 0 24px;
border-bottom: 3px solid @colorBeige;

Expand Down
18 changes: 13 additions & 5 deletions less/character.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
/* Basic Structure */
/* ----------------------------------------- */
.dnd5e.sheet.actor.character {
min-width: 700px;
min-height: 785px;
min-width: 672px;
min-height: 736px;

/* ----------------------------------------- */
/* Sheet Header */
Expand Down Expand Up @@ -59,9 +59,11 @@

// Primary Attributes
.attributes {
height: 80px;
margin: 0;

.attribute {
height: 80px;
margin: 0;
border: none;
border-right: @borderGroove;
Expand All @@ -71,6 +73,12 @@
border-right: none;
}

.attribute-value {
margin: 5px 0 0;
height: 32px;
line-height: 32px;
}

.attribute-name {
margin-top: 6px;
}
Expand Down Expand Up @@ -118,7 +126,7 @@
}

ul.skills-list {
flex: 0 0 226px;
flex: 0 0 212px;

li.skill {
padding: 3px;
Expand All @@ -134,7 +142,7 @@
.death-saves {
flex: 2;
.counter-value {
flex: 0 0 120px;
flex: 0 0 90px;
}
}
}
Expand All @@ -153,7 +161,7 @@
.encumbrance {
flex: 0 0 12px;
background: @colorTan;
margin: 1px 20px 5px 5px;
margin: 1px 15px 0 1px;
border: 1px solid @colorDark;
border-radius: 3px;
position: relative;
Expand Down
4 changes: 2 additions & 2 deletions less/npc.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
/* Basic Structure */
/* ----------------------------------------- */
.dnd5e.sheet.actor.npc {
min-width: 620px;
min-height: 705px;
min-width: 600px;
min-height: 658px;
}
4 changes: 2 additions & 2 deletions module/actor/sheets/character.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export class ActorSheet5eCharacter extends ActorSheet5e {
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["dnd5e", "sheet", "actor", "character"],
width: 700,
height: 785
width: 672,
height: 736
});
}

Expand Down
4 changes: 2 additions & 2 deletions module/actor/sheets/npc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export class ActorSheet5eNPC extends ActorSheet5e {
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["dnd5e", "sheet", "actor", "npc"],
width: 620,
height: 705
width: 600,
height: 658
});
}

Expand Down
3 changes: 2 additions & 1 deletion module/item/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ export class Item5e extends Item {

// Item type specific properties
const props = [];
this[`_${this.data.type}ChatData`](data, labels, props);
const fn = this[`_${this.data.type}ChatData`];
if ( fn ) fn(data, labels, props);

// General equipment properties
if ( data.hasOwnProperty("equipped") && !["loot", "tool"].includes(this.data.type) ) {
Expand Down
Loading

0 comments on commit 4a953a9

Please sign in to comment.