Skip to content

Commit

Permalink
Merge pull request #13012 from clevett/pendragon-2.42
Browse files Browse the repository at this point in the history
Pendragon Sixth Edition 2.42
  • Loading branch information
BronsonHall authored Jun 13, 2024
2 parents 4585597 + 6c2371c commit 057aadc
Show file tree
Hide file tree
Showing 17 changed files with 131 additions and 34 deletions.
2 changes: 1 addition & 1 deletion Pendragon6thEdition/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pendragon6thedition",
"version": "2.4.1",
"version": "2.4.2",
"description": "You need to run npm start to get the compilers going.",
"dependencies": {
"20": "^3.1.9",
Expand Down
41 changes: 36 additions & 5 deletions Pendragon6thEdition/pendragon.css
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,7 @@ div.sheet-tabs {
height: 100%;
width: 80%; }
div.sheet-tabs input:hover ~ span {
transform: scale(1.1); }
div.sheet-tabs input:active ~ span {
margin-top: 2px;
margin-bottom: -2px; }
background-color: #fffde7; }
div.sheet-tabs input:checked ~ span {
background-color: #ab0f14;
color: whitesmoke; }
Expand Down Expand Up @@ -374,6 +371,21 @@ div.sheet-npc {
grid-area: 1 / 2 / 2/ 3; }
div.sheet-npc div.sheet-abilities div.sheet-repeating-container .repitem {
margin-bottom: 1%; }
div.sheet-npc div.sheet-description {
grid-template-columns: 1fr 25px; }
div.sheet-npc div.sheet-description input[name="attr_flag_description"],
div.sheet-npc div.sheet-description input[name="attr_flag_description"] + span.sheet-pictos {
grid-area: 1/2/1/3;
align-self: start;
width: 100%;
height: 25px; }
div.sheet-npc div.sheet-description textarea[name="attr_description"],
div.sheet-npc div.sheet-description span[name="attr_description"] {
grid-area: 1/1/2/2; }
div.sheet-npc .repcontainer[data-groupname="repeating_skills"] {
display: grid;
grid-template-columns: repeat(auto-fill, 193px);
gap: 1rem; }

/* PC
============================= */
Expand All @@ -389,6 +401,12 @@ div.sheet-attacks div.sheet-repeating-container div.sheet-row,
div.sheet-attacks div.sheet-repeating-container div.sheet-header {
grid-template-columns: 2fr 1fr 5em 2.5em; }

div.sheet-attacks label[data-i18n-title="other skill"] {
visibility: hidden; }

div.sheet-attacks input[name="attr_skill"][value*="other"] + label {
visibility: visible; }

div.sheet-character div.sheet-horse input[type="text"],
div.sheet-character div.sheet-horse input[type="number"] {
text-align: center;
Expand Down Expand Up @@ -538,6 +556,13 @@ div.sheet-settings h1 {
div.sheet-settings select {
width: 200px; }

div.sheet-settings input[name="attr_settings_toggle"],
div.sheet-settings input[name="attr_settings_toggle"] + span {
grid-area: 1 / 1 / 1 / 1; }

div.sheet-settings div.sheet-row {
margin-bottom: 2%; }

/* FOOTER
============================= */
div.sheet-footer {
Expand Down Expand Up @@ -649,6 +674,9 @@ input.sheet-flag:checked ~ div.sheet-row input,
input.sheet-flag:checked ~ div.sheet-notes textarea {
display: inherit; }

input[name*="attr_hide_"][value*="hide"] + div {
display: none; }

/* SWITCH
============================= */
.sheet-switch {
Expand Down Expand Up @@ -875,7 +903,10 @@ div.sheet-repeating-container div.sheet-notes {

.itemcontrol .repcontrol_del {
background-color: #832219;
font-family: "pictos"; }
font-family: "pictos";
z-index: 100;
position: absolute;
left: 85%; }

/* DRAG & DROP
============================= */
Expand Down
2 changes: 1 addition & 1 deletion Pendragon6thEdition/pendragon.html

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion Pendragon6thEdition/sheet.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"authors": "Chaosium Inc.",
"preview": "preview.png",
"instructions": "King Arthur Pendragon 6.0.",
"legacy": true
"legacy": true,
"compendium": "pen"
}
21 changes: 21 additions & 0 deletions Pendragon6thEdition/src/pages/_npc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,25 @@ div.sheet-npc {
}
}
}

div.sheet-description {
grid-template-columns: 1fr 25px;

input[name="attr_flag_description"],
input[name="attr_flag_description"] + span.sheet-pictos {
grid-area: 1/2/1/3;
align-self: start;
width: 100%;
height: 25px;
}

textarea[name="attr_description"],
span[name="attr_description"] {
grid-area: 1/1/2/2;
}
}

.repcontainer[data-groupname="repeating_skills"] {
@include horizontalContainer(193px);
}
}
9 changes: 9 additions & 0 deletions Pendragon6thEdition/src/pages/_settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,13 @@ div.sheet-settings {
select {
width: 200px;
}

input[name="attr_settings_toggle"],
input[name="attr_settings_toggle"] + span {
grid-area: 1 / 1 / 1 / 1;
}

div.sheet-row {
margin-bottom: 2%;
}
}
8 changes: 8 additions & 0 deletions Pendragon6thEdition/src/pages/components/_attacks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,12 @@ div.sheet-attacks {
grid-template-columns: $attack-cols;
}
}

label[data-i18n-title="other skill"] {
visibility: hidden;
}

input[name="attr_skill"][value*="other"] + label {
visibility: visible;
}
}
10 changes: 7 additions & 3 deletions Pendragon6thEdition/src/pages/components/attacks.pug
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,13 @@
fieldset(class='repeating_attacks')
.row.grid
+textInput('name')
select(name="attr_skill" title="@{battle}" value="@{battle}")
each val in combatSkills
option(data-i18n=val value=`@{${attrName(val)}}`)
.grid.auto-flow-col
select(name="attr_skill" title="@{skill}" value="@{battle}")
each val in combatSkills
option(data-i18n=val value=`@{${attrName(val)}}`)
option(data-i18n='other' value='@{other_skill}' )
input(type='hidden' name='attr_skill')
+numberInput('other skill')
label(data-i18n-title=`damage` title=`damage`)
input(name=`attr_damage` placeholder='5d6+5' title=`@{damage}` type='text' value='')
+repeatingAttackRollButton('name')
22 changes: 12 additions & 10 deletions Pendragon6thEdition/src/pages/npc.pug
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
.col
+primarySubheader('other')
+npcTable(npcOtherRows)
input(type='hidden' name='attr_hide_npc_knight_attributes' value='1')
.grid.statistic.auto-flow-col
.col
+primarySubheader('knight')
Expand All @@ -33,18 +34,18 @@
.header
h1(data-i18n='skills')
.grid.combat-skills
each val in combatSkills
.row.grid
+rollButton(val)
+numberInput(val)
each val in combatSkills
.row.grid
+rollButton(val)
+numberInput(val)
.row
+subHeader('other')
.repeating-container
fieldset(class='repeating_skills')
.grid.auto-flow-col.3columns
+textInput('name')
+numberInput('skill')
+repeatingRollButton('skill')
fieldset(class='repeating_skills')
.grid.auto-flow-col.3columns
+textInput('name')
+numberInput('skill')
+repeatingRollButton('skill')
.grid.2column.align-start
.grid.traits
.header
Expand Down Expand Up @@ -83,4 +84,5 @@
.grid
.header
h1(data-i18n='description')
textarea(data-i18n-placeholder='description' name='attr_description')
.grid.description.gap
+notesTextarea('description')
19 changes: 14 additions & 5 deletions Pendragon6thEdition/src/pages/settings.pug
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
.grid.settings
.col
h1(data-i18n='character sheet type')
select(name='attr_sheet_select' value='knight').bold
option(data-i18n='knight' value='knight' selected)
option(data-i18n='npc' value='npc')
.grid.auto-flow-col.gap.row
.col
h1(data-i18n='character sheet type')
select(name='attr_sheet_select' value='knight').bold
option(data-i18n='knight' value='knight' selected)
option(data-i18n='npc' value='npc')
.grid.2column.row
.col.gap
h1(data-i18n='hide sections')
.grid.2column
each val in ['npc knight attributes']
.grid.2autocolumn
h2(data-i18n=val).capitalize
+checkboxInput(`hide ${val}`)
2 changes: 1 addition & 1 deletion Pendragon6thEdition/src/pendragon.pug
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//- Semantic Versioning MAJOR.MINORPATCH
input(name='attr_version' type='hidden' value='2.41')
input(name='attr_version' type='hidden' value='2.42')

//- Do not manually change this. Hidden attribute used by versioning script
input(name='attr_latest_versioning_upgrade' type='hidden' value='1')
Expand Down
1 change: 1 addition & 0 deletions Pendragon6thEdition/src/pug/abstracts/mixins.pug
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ mixin dropInput(val)
+textInput(name, i18n, accept)

mixin numberInput(name, i18n, accept)
- i18n = i18n ? i18n : name
label(data-i18n-title=`${i18n}`)
input(name=`attr_${attrName(name)}` placeholder='#' title=`@{${attrName(name)}}` type='number' value='0', accept=accept)

Expand Down
7 changes: 1 addition & 6 deletions Pendragon6thEdition/src/scss/_tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,7 @@ div.sheet-tabs {
width: 80%;

&:hover ~ span {
transform: scale(1.1);
}

&:active ~ span {
margin-top: 2px;
margin-bottom: -2px;
background-color: $light;
}

&:checked ~ span {
Expand Down
6 changes: 6 additions & 0 deletions Pendragon6thEdition/src/scss/abstracts/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,9 @@
background-color: $light;
}
}

@mixin horizontalContainer($width) {
display: grid;
grid-template-columns: repeat(auto-fill, $width);
gap: 1rem;
}
4 changes: 4 additions & 0 deletions Pendragon6thEdition/src/scss/layout/_show_hide.scss
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,7 @@ input.sheet-flag:checked ~ div.sheet-row input,
input.sheet-flag:checked ~ div.sheet-notes textarea {
display: inherit;
}

input[name*="attr_hide_"][value*="hide"] + div {
display: none;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ div.sheet-repeating-container {
.itemcontrol .repcontrol_del {
background-color: $darkPrimary;
font-family: "pictos";
z-index: 100;
position: absolute;
left: 85%;
}
5 changes: 4 additions & 1 deletion Pendragon6thEdition/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,8 @@
"hafted": "hafted",
"ransom": "ransom",
"morale loss": "morale loss",
"knight value": "knight value"
"knight value": "knight value",
"hide sections": "hide sections",
"npc knight attributes": "npc knight attributes",
"other skill": "other skill"
}

0 comments on commit 057aadc

Please sign in to comment.