From c91b8956f6011826bf3cbef3a09342e27aea5237 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Sun, 3 Jan 2021 20:37:30 +0100 Subject: [PATCH 1/9] add data for profile info --- src/lang/en.json | 14 +++++++++++++- src/module/actor/actor-data.ts | 20 ++++++++++++++++++++ src/module/config.ts | 26 +++++++++++++++++++++++++- src/template.json | 18 +++++++++++++++++- 4 files changed, 75 insertions(+), 3 deletions(-) diff --git a/src/lang/en.json b/src/lang/en.json index de17c09b..f529b69c 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -78,8 +78,20 @@ "DS4.BaseInfoClass": "Class", "DS4.BaseInfoHeroClass": "Hero Class", "DS4.BaseInfoRacialAbilities": "Racial Abilites", + "DS4.BaseInfoCulture": "Culture", "DS4.ProgressionLevel": "Level", "DS4.ProgressionExperiencePoints": "Experience Points", "DS4.ProgressionTalentPoints": "Talent Points", - "DS4.ProgressionProgressPoints": "Progress Points" + "DS4.ProgressionProgressPoints": "Progress Points", + "DS4.LanguageLanguages": "Languages", + "DS4.LanguageAlphabets": "Alphabets", + "DS4.ProfileGender": "Gender", + "DS4.ProfileBirthday": "Birthday", + "DS4.ProfileBirthplace": "Birthplace", + "DS4.ProfileAge": "Age", + "DS4.ProfileHeight": "Height", + "DS4.ProfilHairColor": "Hair Color", + "DS4.ProfileWeight": "Weight", + "DS4.ProfileEyeColor": "Eye Color", + "DS4.ProfileSpecialCharacteristics": "Special Characteristics" } diff --git a/src/module/actor/actor-data.ts b/src/module/actor/actor-data.ts index 93385b65..746ae439 100644 --- a/src/module/actor/actor-data.ts +++ b/src/module/actor/actor-data.ts @@ -4,6 +4,8 @@ export interface DS4ActorDataType { combatValues: DS4ActorDataCombatValues; baseInfo: DS4ActorDataBaseInfo; progression: DS4ActorDataProgression; + language: DS4ActorDataLanguage; + profile: DS4ActorDataProfile; } interface DS4ActorDataAttributes { @@ -55,6 +57,7 @@ interface DS4ActorDataBaseInfo { class: string; heroClass: string; racialAbilities: string; + culture: string; } interface DS4ActorDataProgression { @@ -63,3 +66,20 @@ interface DS4ActorDataProgression { talentPoints: UsableResource; progressPoints: UsableResource; } + +interface DS4ActorDataLanguage { + languages: string; + alphabets: string; +} + +interface DS4ActorDataProfile { + gender: string; + birthday: string; + birthplace: string; + age: number; + height: number; + hairColor: string; + weight: number; + eyeColor: string; + specialCharacteristics: string; +} diff --git a/src/module/config.ts b/src/module/config.ts index 89d285cf..deafe0db 100644 --- a/src/module/config.ts +++ b/src/module/config.ts @@ -135,10 +135,11 @@ export const DS4 = { class: "DS4.BaseInfoClass", heroClass: "DS4.BaseInfoHeroClass", racialAbilities: "DS4.BaseInfoRacialAbilities", + culture: "DS4.BaseInfoCulture", }, /** - * Definme the progression info of a character + * Define the progression info of a character */ progression: { level: "DS4.ProgressionLevel", @@ -146,4 +147,27 @@ export const DS4 = { talentPoints: "DS4.ProgressionTalentPoints", progressPoints: "DS4.ProgressionProgressPoints", }, + + /** + * Define the language info of a character + */ + language: { + languages: "DS4.LanguageLanguages", + alphabets: "DS4.LanguageAlphabets", + }, + + /** + * Define the profile info of a character + */ + profile: { + gender: "DS4.ProfileGender", + birthday: "DS4.ProfileBirthday", + birthplace: "DS4.ProfileBirthplace", + age: "DS4.ProfileAge", + height: "DS4.ProfileHeight", + hairColor: "DS4.ProfilHairColor", + weight: "DS4.ProfileWeight", + eyeColor: "DS4.ProfileEyeColor", + specialCharacteristics: "DS4.ProfileSpecialCharacteristics", + }, }; diff --git a/src/template.json b/src/template.json index b78fd3e1..fe663ed3 100644 --- a/src/template.json +++ b/src/template.json @@ -83,7 +83,8 @@ "race": "", "class": "", "heroClass": "", - "racialAbilities": "" + "racialAbilities": "", + "culture": "" }, "progression": { "level": 0, @@ -96,6 +97,21 @@ "total": 0, "used": 0 } + }, + "language": { + "languages": "", + "alphabets": "" + }, + "profile": { + "gender": "", + "birthday": "", + "birthplace": "", + "age": 0, + "height": 0, + "hairColor": "", + "weight": 0, + "eyeColor": "", + "specialCharacteristics": "" } } }, From 98ce35f83159c6b393db7d0041bd82b02dc1d5f8 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Sun, 3 Jan 2021 20:54:45 +0100 Subject: [PATCH 2/9] Add dummy profile tab to character sheet --- src/lang/en.json | 2 ++ src/module/ds4.ts | 3 +++ src/templates/actor/actor-sheet.hbs | 8 ++++++-- src/templates/actor/partials/profile.hbs | 1 + 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 src/templates/actor/partials/profile.hbs diff --git a/src/lang/en.json b/src/lang/en.json index f529b69c..8159ced0 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -5,6 +5,8 @@ "DS4.DescriptionAbbr": "Desc", "DS4.Details": "Details", "DS4.Effects": "Effects", + "DS4.Profile": "Profile", + "DS4.Items": "Items", "DS4.AttackType": "Attack Type", "DS4.AttackTypeAbbr": "AT", "DS4.WeaponBonus": "Weapon Bonus", diff --git a/src/module/ds4.ts b/src/module/ds4.ts index 358074b0..2fef8f04 100644 --- a/src/module/ds4.ts +++ b/src/module/ds4.ts @@ -39,6 +39,7 @@ async function registerHandlebarsPartials() { "systems/ds4/templates/actor/partials/items-overview.hbs", "systems/ds4/templates/actor/partials/attributes-traits.hbs", "systems/ds4/templates/actor/partials/combat-values.hbs", + "systems/ds4/templates/actor/partials/profile.hbs", ]; return loadTemplates(templatePaths); } @@ -66,6 +67,8 @@ Hooks.once("setup", function () { "combatValues", "baseInfo", "progression", + "language", + "profile", ]; // Exclude some from sorting where the default order matters diff --git a/src/templates/actor/actor-sheet.hbs b/src/templates/actor/actor-sheet.hbs index 475ce2fd..aa9658d4 100644 --- a/src/templates/actor/actor-sheet.hbs +++ b/src/templates/actor/actor-sheet.hbs @@ -90,8 +90,9 @@ {{!-- Sheet Tab Navigation --}} {{!-- Sheet Body --}} @@ -101,6 +102,9 @@ {{editor content=data.biography target="data.biography" button=true owner=owner editable=editable}} + {{! Profile Tab --}} + {{> systems/ds4/templates/actor/partials/profile.hbs}} + {{!-- Items Tab --}} {{> systems/ds4/templates/actor/partials/items-overview.hbs}} diff --git a/src/templates/actor/partials/profile.hbs b/src/templates/actor/partials/profile.hbs new file mode 100644 index 00000000..4755d267 --- /dev/null +++ b/src/templates/actor/partials/profile.hbs @@ -0,0 +1 @@ +
\ No newline at end of file From 2cb04112880f84d884168cff057af51388fd7574 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Sun, 3 Jan 2021 23:26:31 +0100 Subject: [PATCH 3/9] Add basic form of editable profile fields to profile tab --- src/module/config.ts | 15 +++++++++++++++ src/templates/actor/partials/profile.hbs | 12 +++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/src/module/config.ts b/src/module/config.ts index deafe0db..c5c1dea3 100644 --- a/src/module/config.ts +++ b/src/module/config.ts @@ -170,4 +170,19 @@ export const DS4 = { eyeColor: "DS4.ProfileEyeColor", specialCharacteristics: "DS4.ProfileSpecialCharacteristics", }, + + /** + * Define the profile info types for hanndlebars of a character + */ + profileDTypes: { + gender: "String", + birthday: "String", + birthplace: "String", + age: "Number", + height: "Number", + hairColor: "String", + weight: "Number", + eyeColor: "String", + specialCharacteristics: "String", + }, }; diff --git a/src/templates/actor/partials/profile.hbs b/src/templates/actor/partials/profile.hbs index 4755d267..def5d419 100644 --- a/src/templates/actor/partials/profile.hbs +++ b/src/templates/actor/partials/profile.hbs @@ -1 +1,11 @@ -
\ No newline at end of file +
+
+ {{#each data.profile as |profile-data-value profile-data-key|}} +
+ + +
+ {{/each}} +
+
\ No newline at end of file From 520aab8b72ed0d9e34e741088fd05a28b7a22451 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Mon, 4 Jan 2021 00:19:51 +0100 Subject: [PATCH 4/9] cleanup profile --- src/templates/actor/partials/profile.hbs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/templates/actor/partials/profile.hbs b/src/templates/actor/partials/profile.hbs index def5d419..b0034128 100644 --- a/src/templates/actor/partials/profile.hbs +++ b/src/templates/actor/partials/profile.hbs @@ -2,7 +2,9 @@
{{#each data.profile as |profile-data-value profile-data-key|}}
- +
From f8deca4cd48d76d6a6e9d5c0321fc191ebb288f9 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Mon, 4 Jan 2021 21:51:58 +0100 Subject: [PATCH 5/9] add culture and save space with base infos and progression infos --- src/ds4.scss | 1 + src/module/ds4.ts | 1 + src/scss/components/_basic_property.scss | 6 + .../components/_character_progression.scss | 30 +++++ src/scss/global/_flex.scss | 6 + src/scss/global/_grid.scss | 4 +- src/templates/actor/actor-sheet.hbs | 114 +++++++----------- .../actor/partials/character-progression.hbs | 15 +++ 8 files changed, 102 insertions(+), 75 deletions(-) create mode 100644 src/scss/components/_character_progression.scss create mode 100644 src/templates/actor/partials/character-progression.hbs diff --git a/src/ds4.scss b/src/ds4.scss index 2fedca1f..a3b14a06 100644 --- a/src/ds4.scss +++ b/src/ds4.scss @@ -20,4 +20,5 @@ @import "scss/components/character_values"; @import "scss/components/attributes_traits"; @import "scss/components/combat_values"; + @import "scss/components/character_progression"; } diff --git a/src/module/ds4.ts b/src/module/ds4.ts index 2fef8f04..cf43adb8 100644 --- a/src/module/ds4.ts +++ b/src/module/ds4.ts @@ -40,6 +40,7 @@ async function registerHandlebarsPartials() { "systems/ds4/templates/actor/partials/attributes-traits.hbs", "systems/ds4/templates/actor/partials/combat-values.hbs", "systems/ds4/templates/actor/partials/profile.hbs", + "systems/ds4/templates/actor/partials/character-progression.hbs", ]; return loadTemplates(templatePaths); } diff --git a/src/scss/components/_basic_property.scss b/src/scss/components/_basic_property.scss index 6f725dad..e284529c 100644 --- a/src/scss/components/_basic_property.scss +++ b/src/scss/components/_basic_property.scss @@ -1,6 +1,9 @@ .basic-properties { flex: 0 0 100%; + gap: 2px; .basic-property { + padding-left: 1px; + padding-right: 1px; .basic-property-label { font-weight: bold; } @@ -9,5 +12,8 @@ display: block; width: 100%; } + .input-divider { + text-align: center; + } } } diff --git a/src/scss/components/_character_progression.scss b/src/scss/components/_character_progression.scss new file mode 100644 index 00000000..8e663cbb --- /dev/null +++ b/src/scss/components/_character_progression.scss @@ -0,0 +1,30 @@ +.progression { + .progression-entry { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: flex-end; + align-items: center; + + padding-right: 3px; + h2.progression-label { + font-family: $font-heading; + display: block; + height: 50px; + padding: 0px; + color: $c-light-grey; + border: none; + line-height: 50px; + margin: $header-top-margin 0; + text-align: right; + //flex: 0; + } + input.progression-value { + margin-left: 5px; + flex: 0 0 40px; + text-align: left; + border: none; + background-color: transparent; + } + } +} diff --git a/src/scss/global/_flex.scss b/src/scss/global/_flex.scss index 271c64b3..3f23d105 100644 --- a/src/scss/global/_flex.scss +++ b/src/scss/global/_flex.scss @@ -18,6 +18,9 @@ .flex1 { flex: 1; } + .flex125 { + flex: 1.25; + } .flex15 { flex: 1.5; } @@ -51,6 +54,9 @@ .flex1 { flex: 1; } + .flex125 { + flex: 1.25; + } .flex15 { flex: 1.5; } diff --git a/src/scss/global/_grid.scss b/src/scss/global/_grid.scss index 8498a314..b8903f70 100644 --- a/src/scss/global/_grid.scss +++ b/src/scss/global/_grid.scss @@ -28,8 +28,8 @@ } .grid-6col { - grid-column: span 5 / span 5; - grid-template-columns: repeat(5, minmax(0, 1fr)); + grid-column: span 6 / span 6; + grid-template-columns: repeat(6, minmax(0, 1fr)); } .grid-7col { diff --git a/src/templates/actor/actor-sheet.hbs b/src/templates/actor/actor-sheet.hbs index aa9658d4..461eaff5 100644 --- a/src/templates/actor/actor-sheet.hbs +++ b/src/templates/actor/actor-sheet.hbs @@ -2,89 +2,57 @@ {{!-- Sheet Header --}}
-
+

-
-
- {{!-- The grid classes are defined in scss/global/_grid.scss. To use, use both the "grid" and "grid-Ncol" - class where "N" can be any number from 1 to 12 and will create that number of columns. --}} -
- {{!-- "flex-group-center" is also defined in the _grid.scss file and it will add a small amount of - padding, a border, and will center all of its child elements content and text. --}} -
- -
- + {{> systems/ds4/templates/actor/partials/character-progression.hbs}} + +
+
+ + +
+
+ + +
+
+ +
+ / +
-
-
-
- -
- -
-
-
- -
- / - -
-
-
- -
- / - -
-
+
+ +
+ / +
-
- -
- -
+
+ +
-
- -
- -
-
-
- -
- -
-
-
- -
- -
+
+ +
- +
+
{{> systems/ds4/templates/actor/partials/attributes-traits.hbs}} {{> systems/ds4/templates/actor/partials/combat-values.hbs}} -
diff --git a/src/templates/actor/partials/character-progression.hbs b/src/templates/actor/partials/character-progression.hbs new file mode 100644 index 00000000..4b1790f4 --- /dev/null +++ b/src/templates/actor/partials/character-progression.hbs @@ -0,0 +1,15 @@ +
+
+

+

+ +
+
+

+

+ +
+
From f2f40a8e89fe168fe4789206e92701adc0031c39 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Mon, 4 Jan 2021 22:12:19 +0100 Subject: [PATCH 6/9] make some input fiels accept only number --- src/templates/actor/actor-sheet.hbs | 8 ++++---- src/templates/actor/partials/character-progression.hbs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/templates/actor/actor-sheet.hbs b/src/templates/actor/actor-sheet.hbs index 461eaff5..989ab3a0 100644 --- a/src/templates/actor/actor-sheet.hbs +++ b/src/templates/actor/actor-sheet.hbs @@ -20,10 +20,10 @@
- / -
@@ -31,10 +31,10 @@
- / -
diff --git a/src/templates/actor/partials/character-progression.hbs b/src/templates/actor/partials/character-progression.hbs index 4b1790f4..f22376f0 100644 --- a/src/templates/actor/partials/character-progression.hbs +++ b/src/templates/actor/partials/character-progression.hbs @@ -2,14 +2,14 @@

-

-
From 9de78b4940182d24dacd9dc7ff5379d6a179822e Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Wed, 6 Jan 2021 00:02:30 +0100 Subject: [PATCH 7/9] small style fixes --- src/scss/components/_attributes_traits.scss | 4 ++-- src/scss/global/_window.scss | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/scss/components/_attributes_traits.scss b/src/scss/components/_attributes_traits.scss index 19cef982..09cb469b 100644 --- a/src/scss/components/_attributes_traits.scss +++ b/src/scss/components/_attributes_traits.scss @@ -8,7 +8,6 @@ } .attribute-value { border: 2px groove $c-border-groove; - line-height: $default-input-height; font-size: 1.5em; text-align: center; padding-left: 2px; @@ -17,6 +16,7 @@ input, .attribute-value-total { grid-column: span 2; + line-height: $default-input-height; } } } @@ -32,7 +32,6 @@ .trait-value { border: 2px groove $c-border-groove; font-size: 1.5em; - line-height: $default-input-height; text-align: center; padding-left: 2px; padding-right: 2px; @@ -40,6 +39,7 @@ input, .trait-value-total { grid-column: span 2; + line-height: $default-input-height; } } } diff --git a/src/scss/global/_window.scss b/src/scss/global/_window.scss index bbe12083..36985d71 100644 --- a/src/scss/global/_window.scss +++ b/src/scss/global/_window.scss @@ -1,5 +1,12 @@ .window-app { font-family: $font-primary; + input[type="text"], + input[type="number"], + input[type="password"], + input[type="date"], + input[type="time"] { + width: 100%; + } } .rollable { From e9533608c82f3ac7816cba0dc66f59b85bcfe348 Mon Sep 17 00:00:00 2001 From: Siegfried Krug Date: Wed, 6 Jan 2021 21:38:26 +0100 Subject: [PATCH 8/9] add mail to readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4222e363..9b502a47 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ npm test ## Contributing Code and content contributions are accepted. Please feel free to submit issues -to the issue tracker or submit merge requests for code changes. +to the issue tracker or submit merge requests for code changes. To create an issue send a mail to [git+dungeonslayers-ds4-155-issue-@git.f3l.de](mailto:git+dungeonslayers-ds4-155-issue-@git.f3l.de). ## Licensing From 1f6d8b798043c50447ad5b958e5a9f2fa856e922 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Wed, 6 Jan 2021 23:51:08 +0100 Subject: [PATCH 9/9] cleanup --- src/scss/components/_character_progression.scss | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/scss/components/_character_progression.scss b/src/scss/components/_character_progression.scss index 8e663cbb..c2b3fdcd 100644 --- a/src/scss/components/_character_progression.scss +++ b/src/scss/components/_character_progression.scss @@ -23,8 +23,6 @@ margin-left: 5px; flex: 0 0 40px; text-align: left; - border: none; - background-color: transparent; } } }