Skip to content

Commit

Permalink
closes #375
Browse files Browse the repository at this point in the history
  • Loading branch information
Muttley committed Sep 16, 2023
1 parent 493cb15 commit 77151e3
Show file tree
Hide file tree
Showing 31 changed files with 677 additions and 95 deletions.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

### Enhancement
* [#342] Identify "rare" languages in the language selector to aid in selection
* [#375] Added support for custom ancestries
* [#447] Added ability to easily access filtered compendium items
* [#480] Added ability to create custom weapon and armor properties
* [#490] Added Condition for Halfling's "Stealthy" Invisibility ability
Expand Down
2 changes: 1 addition & 1 deletion i18n/de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ SHADOWDARK.sheet.npc.movement: Bewegung
SHADOWDARK.sheet.npc.tab.abilities: Fähigkeiten
SHADOWDARK.sheet.npc.tab.description: Beschreibung
SHADOWDARK.sheet.player.active_effect_override: This value is being modified by an Active Effect and cannot be edited. Disable the effect to edit it.
SHADOWDARK.sheet.player.ancestry: Abstammung
SHADOWDARK.sheet.player.ancestry.label: Abstammung
SHADOWDARK.sheet.player.available_spells: Verfügbare Zauber
SHADOWDARK.sheet.player.background: Hintergrund
SHADOWDARK.sheet.player.class: Klasse
Expand Down
10 changes: 9 additions & 1 deletion i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ SHADOWDARK.alignment.lawful_short: L
SHADOWDARK.alignment.lawful: Lawful
SHADOWDARK.alignment.neutral_short: "N"
SHADOWDARK.alignment.neutral: Neutral
SHADOWDARK.ancestry.language_choices.label: Additional Languages
SHADOWDARK.ancestry.languages.label: Ancestry Languages
SHADOWDARK.ancestry.languages.prompt: Select Language...
SHADOWDARK.ancestry.talents.label: Ancestry Talents
SHADOWDARK.ancestry.talents.prompt: Select Talent...
SHADOWDARK.app.active_effects.title: Active Effects
SHADOWDARK.app.gem_bag.sell_all: Sell All Gems
SHADOWDARK.app.gem_bag.title: Gem Bag
Expand Down Expand Up @@ -154,6 +159,8 @@ SHADOWDARK.dialog.item.use: Use
SHADOWDARK.dialog.light_source.pick_up.title: Select actor to give lightsource
SHADOWDARK.dialog.roll_mode_label: Rolling mode
SHADOWDARK.dialog.roll: Roll
SHADOWDARK.dialog.select_ancestry.prompt: Select Ancestry...
SHADOWDARK.dialog.select_ancestry.title: Choose Ancestry
SHADOWDARK.dialog.select_armor_property.prompt: Select Armor Property...
SHADOWDARK.dialog.select_armor_property.title: Choose Armor Properties
SHADOWDARK.dialog.select_languages.prompt: Select Language...
Expand Down Expand Up @@ -469,7 +476,8 @@ SHADOWDARK.sheet.npc.movement: Movement
SHADOWDARK.sheet.npc.tab.abilities: Abilities
SHADOWDARK.sheet.npc.tab.description: Description
SHADOWDARK.sheet.player.active_effect_override: This value is being modified by an Active Effect and cannot be edited. Disable the effect to edit it.
SHADOWDARK.sheet.player.ancestry: Ancestry
SHADOWDARK.sheet.player.ancestry.label: Ancestry
SHADOWDARK.sheet.player.ancestry.tooltip: Your character's cultural and ancestral heritage
SHADOWDARK.sheet.player.available_spells: Available Spells
SHADOWDARK.sheet.player.background: Background
SHADOWDARK.sheet.player.class: Class
Expand Down
4 changes: 2 additions & 2 deletions i18n/es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ SHADOWDARK.dialog.hp_roll.previous_hp: "PV antes de tirar: {hp}"
SHADOWDARK.dialog.hp_roll.roll_level_1: Obtienes {hp} PV por nivel 1 (incluido modificador)
SHADOWDARK.dialog.hp_roll.roll_per_level: Obtienes {hp} PV por nivel {level}
SHADOWDARK.dialog.hp_roll.sum_total: Nuevos PV máximos {total}
SHADOWDARK.dialog.hp_roll.summary: Sumario de tiradas de PV
SHADOWDARK.dialog.hp_roll.summary: Sumario de tiradas de PV
SHADOWDARK.dialog.hp_roll.title: Tirada de PV
SHADOWDARK.dialog.item_roll.ability_bonus: Bonus de habilidad
SHADOWDARK.dialog.item_roll.item_bonus: Bonus de ítem
Expand Down Expand Up @@ -451,7 +451,7 @@ SHADOWDARK.sheet.npc.movement: Movimiento
SHADOWDARK.sheet.npc.tab.abilities: Habilidades
SHADOWDARK.sheet.npc.tab.description: Descripción
SHADOWDARK.sheet.player.active_effect_override: Este valor está siendo modificado por un efecto activo y no puede ser editado. Deshabilita el efecto para editarlo.
SHADOWDARK.sheet.player.ancestry: Ancestría
SHADOWDARK.sheet.player.ancestry.label: Ancestría
SHADOWDARK.sheet.player.available_spells: Hechizos disponibles
SHADOWDARK.sheet.player.background: Trasfondo
SHADOWDARK.sheet.player.class: Clase
Expand Down
2 changes: 1 addition & 1 deletion i18n/fi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ SHADOWDARK.sheet.npc.movement: Liikkumisnopeus
SHADOWDARK.sheet.npc.tab.abilities: Kyvyt
SHADOWDARK.sheet.npc.tab.description: Kuvaus
SHADOWDARK.sheet.player.active_effect_override: Tähän arvoon vaikuttaa aktiivinen efekti, eikä sitä pystytä juuri nyt muokkamaan. Disabloi kyseinen efekti muokataksesi arvoa.
SHADOWDARK.sheet.player.ancestry: Laji
SHADOWDARK.sheet.player.ancestry.label: Laji
SHADOWDARK.sheet.player.available_spells: Saatavilla olevat loitsut
SHADOWDARK.sheet.player.background: Tausta
SHADOWDARK.sheet.player.class: Hahmoluokka
Expand Down
2 changes: 1 addition & 1 deletion i18n/fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ SHADOWDARK.sheet.npc.movement: Movement
SHADOWDARK.sheet.npc.tab.abilities: Abilities
SHADOWDARK.sheet.npc.tab.description: Description
SHADOWDARK.sheet.player.active_effect_override: This value is being modified by an Active Effect and cannot be edited. Disable the effect to edit it.
SHADOWDARK.sheet.player.ancestry: Ascendance
SHADOWDARK.sheet.player.ancestry.label: Ascendance
SHADOWDARK.sheet.player.available_spells: Available Spells
SHADOWDARK.sheet.player.background: Historique
SHADOWDARK.sheet.player.class: Classe
Expand Down
2 changes: 1 addition & 1 deletion i18n/ko.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ SHADOWDARK.sheet.npc.movement: 이동
SHADOWDARK.sheet.npc.tab.abilities: 능력
SHADOWDARK.sheet.npc.tab.description: 설명
SHADOWDARK.sheet.player.active_effect_override: 이것은 현재 활성화된 효과에 의해 변경된 것이며 수정할 수 없습니다. 수정하려면 해당 효과를 비활성화하세요.
SHADOWDARK.sheet.player.ancestry: 선조
SHADOWDARK.sheet.player.ancestry.label: 선조
SHADOWDARK.sheet.player.available_spells: 시전 가능한 주문
SHADOWDARK.sheet.player.background: 배경
SHADOWDARK.sheet.player.class: 클래스
Expand Down
2 changes: 1 addition & 1 deletion i18n/sv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ SHADOWDARK.sheet.npc.movement: Förflyttning
SHADOWDARK.sheet.npc.tab.abilities: Förmågor
SHADOWDARK.sheet.npc.tab.description: Beskrivning
SHADOWDARK.sheet.player.active_effect_override: Detta värde ändras av en aktiv effekt och kan inte redigeras. Inaktivera effekten för att redigera den.
SHADOWDARK.sheet.player.ancestry: Ursprung
SHADOWDARK.sheet.player.ancestry.label: Ursprung
SHADOWDARK.sheet.player.available_spells: Tillgängliga besvärjelser
SHADOWDARK.sheet.player.background: Bakgrund
SHADOWDARK.sheet.player.class: Klass
Expand Down
78 changes: 40 additions & 38 deletions scss/sheets/actors/_player.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
input {
@include p-reset;
font-family: "Montserrat-Medium";
font-size: 16px;
font-size: 1.1rem;

text-overflow: ellipsis;
text-align: center;
Expand All @@ -28,6 +28,21 @@
border: none;
}

label {
@include p-reset;
display: block;

font-family: "Old Newspaper Font";
font-size: 1.3rem;
font-weight: bold;

line-height: 1.1;

align-self: center;

border: none;
}

ol {
padding: 4px;
margin: 4px;
Expand Down Expand Up @@ -129,19 +144,19 @@
background-color: var(--form-background);
}

label {
display: block;
@include p-reset;
// label {
// display: block;
// @include p-reset;

font-family: "Old Newspaper Font";
font-size: 20px;
font-weight: bold;
text-decoration: underline;
// font-family: "Old Newspaper Font";
// font-size: 20px;
// font-weight: bold;
// text-decoration: underline;

line-height: 1.1;
// line-height: 1.1;

border: none;
}
// border: none;
// }

}

Expand Down Expand Up @@ -203,24 +218,17 @@
}

.detail-box,
.language-box {
.pc {
@include p-reset;
display: grid;
grid-template-columns: minmax(min-content, max-content) 1fr;
background-color: var(--form-background);
column-gap: 8px;

label {
@include p-reset;
display: block;

font-family: "Old Newspaper Font";
font-size: 20px;
a {
font-family: "Montserrat-Medium";
font-size: 1.0rem;
font-weight: bold;

line-height: 1.1;

border: none;
}
}

Expand All @@ -229,8 +237,10 @@
font-size: 16px;
}

.language-box {
.pc_ancestry,
.pc_languages {
grid-template-columns: min-content min-content 1fr;
align-items: center;
}

.detail-value {
Expand Down Expand Up @@ -268,7 +278,8 @@
align-items: center;

p {
font-size: 18px;
font-size: 1.3rem;
font-weight: bold;
}
}

Expand Down Expand Up @@ -424,19 +435,6 @@
column-gap: 8px;
align-items: center;
text-align: center;

label {
@include p-reset;
display: block;

font-family: "Old Newspaper Font";
font-size: 20px;
font-weight: bold;

line-height: 1.1;

border: none;
}
}

.luck {
Expand All @@ -447,7 +445,7 @@
column-gap: 4px;

p {
font-size: 20px;
font-size: 1.3rem;
font-weight: bold;
}
}
Expand Down Expand Up @@ -707,6 +705,10 @@
}
}

.uuid-link {
margin: 4px;
}

.xp-score {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
Expand Down
42 changes: 42 additions & 0 deletions scss/sheets/items/_item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,48 @@
row-gap: 4px;
}

.choice-selector {
display: grid;
grid-column: span 2;

font-family: "Montserrat-Medium";
font-size: 1.0rem;
font-weight: bold;

form {
.form-group {
@include p-reset;

input:focus {
border-bottom: 1px solid #644f33;
}

select {
flex: 2;
margin-right: 5px;
}

input[type="text"] {
background: rgba(255, 255, 255, 0.5);
border: 1px solid #aaa;
}

input::placeholder {
color: var(--primary);
}

}
}

.delete-choice {
color: darkred;
}

.uuid-link {
margin: 4px;
}
}

.coins {
display: grid;
row-gap: 4px;
Expand Down
4 changes: 3 additions & 1 deletion system/shadowdark.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import performDataMigration from "./src/migration.mjs";
import registerHandlebarsHelpers from "./src/handlebars.mjs";
import registerSystemSettings from "./src/settings.mjs";
import SHADOWDARK from "./src/config.mjs";
import UtilitySD from "./src/utils/UtilitySD.mjs";

import * as apps from "./src/apps/_module.mjs";
import * as chat from "./src/chat/_module.mjs";
Expand All @@ -29,13 +30,14 @@ import "./src/testing/index.mjs";

globalThis.shadowdark = {
apps,
config: SHADOWDARK,
compendiums: CompendiumsSD,
config: SHADOWDARK,
defaults: SHADOWDARK.DEFAULTS,
dice,
documents,
log,
sheets,
utils: UtilitySD,
};

/* -------------------------------------------- */
Expand Down
12 changes: 8 additions & 4 deletions system/src/apps/CompendiumItemSelector.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export default class CompendiumItemSelector extends FormApplication {

closeOnSelection = false;

maxChoices = 0;

static get defaultOptions() {
Expand Down Expand Up @@ -113,17 +115,17 @@ export default class CompendiumItemSelector extends FormApplication {
}
}

return await this._saveUuids(newUuids);
await this._saveUuids(newUuids);
}
else if (this.maxChoices === 0 || this.maxChoices > currentItemCount) {
for (const item of this.availableItems) {
if (item.name === formData["item-selected"]) {
if (item.decoratedName === formData["item-selected"]) {
newUuids.push(item.uuid);
break;
}
}

return await this._saveUuids(newUuids);
await this._saveUuids(newUuids);
}
else {
ui.notifications.warn(
Expand All @@ -132,7 +134,9 @@ export default class CompendiumItemSelector extends FormApplication {
)
);

this.render(true);
return this.render(true);
}

if (this.closeOnSelection) this.close({force: true});
}
}
Loading

0 comments on commit 77151e3

Please sign in to comment.