From a75a3bf157c54ad2531a86f3f19e76208d6b80c3 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Thu, 6 Feb 2025 21:35:22 +0100 Subject: [PATCH] Fix #39 - Display cured/uncured for mental disorder --- css/fvtt-cthulhu-eternal.css | 63 +++++++++-------- .../applications/sheets/protagonist-sheet.mjs | 4 +- .../skills/{000106.log => 000113.log} | 0 packs-system/skills/CURRENT | 2 +- packs-system/skills/LOG | 11 +-- packs-system/skills/LOG.old | 16 ++--- packs-system/skills/MANIFEST-000104 | Bin 139 -> 0 bytes packs-system/skills/MANIFEST-000112 | Bin 0 -> 123 bytes styles/protagonist.less | 65 ++++++++++-------- templates/protagonist-main.hbs | 5 +- 10 files changed, 86 insertions(+), 80 deletions(-) rename packs-system/skills/{000106.log => 000113.log} (100%) delete mode 100644 packs-system/skills/MANIFEST-000104 create mode 100644 packs-system/skills/MANIFEST-000112 diff --git a/css/fvtt-cthulhu-eternal.css b/css/fvtt-cthulhu-eternal.css index 79d8f9a..5940819 100644 --- a/css/fvtt-cthulhu-eternal.css +++ b/css/fvtt-cthulhu-eternal.css @@ -462,6 +462,10 @@ i.fvtt-cthulhu-eternal { .fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .char-text { margin-left: 0.5rem; } +.fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .d100 { + flex: 0; + max-width: 0.6rem; +} .fvtt-cthulhu-eternal .protagonist-main .protagonist-characteristics .protagonist-characteristic .form-group { flex: 0; padding-left: 5px; @@ -523,31 +527,6 @@ i.fvtt-cthulhu-eternal { min-width: 18rem; max-width: 18rem; } -.fvtt-cthulhu-eternal .protagonist-biography .motivations { - display: grid; - grid-template-columns: repeat(2, 1fr); - gap: 4px; -} -.fvtt-cthulhu-eternal .protagonist-biography .motivations .motivation { - display: flex; - align-items: center; - gap: 4px; - min-width: 14rem; - max-width: 14rem; -} -.fvtt-cthulhu-eternal .protagonist-biography .motivations .motivation .controls { - min-width: 2rem; - max-width: 2rem; -} -.fvtt-cthulhu-eternal .protagonist-biography .motivations .motivation .name { - min-width: 8rem; - max-width: 8rem; -} -.fvtt-cthulhu-eternal .protagonist-biography .motivations .motivation .item-img { - width: 32px; - height: 32px; - margin: 4px 0 0 0; -} .fvtt-cthulhu-eternal .tab.protagonist-skills { background-color: var(--color-light-1); display: grid; @@ -566,8 +545,9 @@ i.fvtt-cthulhu-eternal { display: flex; align-items: center; gap: 4px; - min-width: 10rem; - max-width: 10rem; + margin-left: 4px; + min-width: 12rem; + max-width: 12rem; } .fvtt-cthulhu-eternal .tab.protagonist-skills .skills .skill .rollable:hover, .fvtt-cthulhu-eternal .tab.protagonist-skills .skills .skill .rollable:focus { @@ -579,8 +559,8 @@ i.fvtt-cthulhu-eternal { max-width: 2rem; } .fvtt-cthulhu-eternal .tab.protagonist-skills .skills .skill .name { - min-width: 8rem; - max-width: 8rem; + min-width: 11rem; + max-width: 11rem; } .fvtt-cthulhu-eternal .tab.protagonist-skills .skills .skill .item-img { width: 24px; @@ -629,6 +609,31 @@ i.fvtt-cthulhu-eternal { height: 24px; margin: 4px 0 0 0; } +.fvtt-cthulhu-eternal .tab.protagonist-status .motivations { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 4px; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .motivations .motivation { + display: flex; + align-items: center; + gap: 4px; + min-width: 14rem; + max-width: 14rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .motivations .motivation .controls { + min-width: 2rem; + max-width: 2rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .motivations .motivation .name { + min-width: 12rem; + max-width: 12rem; +} +.fvtt-cthulhu-eternal .tab.protagonist-status .motivations .motivation .item-img { + width: 24px; + height: 24px; + margin: 4px 0 0 0; +} .fvtt-cthulhu-eternal .tab.protagonist-status .mentaldisorders { display: grid; grid-template-columns: repeat(2, 1fr); diff --git a/module/applications/sheets/protagonist-sheet.mjs b/module/applications/sheets/protagonist-sheet.mjs index 025aa53..d8d1d8d 100644 --- a/module/applications/sheets/protagonist-sheet.mjs +++ b/module/applications/sheets/protagonist-sheet.mjs @@ -115,13 +115,13 @@ export default class CthulhuEternalProtagonistSheet extends CthulhuEternalActorS context.injuries.sort((a, b) => a.name.localeCompare(b.name)) context.mentaldisorders = doc.itemTypes.mentaldisorder context.mentaldisorders.sort((a, b) => a.name.localeCompare(b.name)) + context.motivations = doc.itemTypes.motivation + context.motivations.sort((a, b) => a.name.localeCompare(b.name)) context.bonds = doc.itemTypes.bond context.bonds.sort((a, b) => a.name.localeCompare(b.name)) break case "biography": context.tab = context.tabs.biography - context.motivations = doc.itemTypes.motivation - context.motivations.sort((a, b) => a.name.localeCompare(b.name)) context.enrichedDescription = await TextEditor.enrichHTML(doc.system.description, { async: true }) context.enrichedNotes = await TextEditor.enrichHTML(doc.system.notes, { async: true }) break diff --git a/packs-system/skills/000106.log b/packs-system/skills/000113.log similarity index 100% rename from packs-system/skills/000106.log rename to packs-system/skills/000113.log diff --git a/packs-system/skills/CURRENT b/packs-system/skills/CURRENT index c8e9be6..b59a6ba 100644 --- a/packs-system/skills/CURRENT +++ b/packs-system/skills/CURRENT @@ -1 +1 @@ -MANIFEST-000104 +MANIFEST-000112 diff --git a/packs-system/skills/LOG b/packs-system/skills/LOG index 3f76b3f..c0f88d7 100644 --- a/packs-system/skills/LOG +++ b/packs-system/skills/LOG @@ -1,8 +1,3 @@ -2025/02/06-20:25:16.737126 7ffae77fe6c0 Recovering log #102 -2025/02/06-20:25:16.746805 7ffae77fe6c0 Delete type=3 #100 -2025/02/06-20:25:16.746880 7ffae77fe6c0 Delete type=0 #102 -2025/02/06-21:09:49.042911 7ffae6bff6c0 Level-0 table #107: started -2025/02/06-21:09:49.042956 7ffae6bff6c0 Level-0 table #107: 0 bytes OK -2025/02/06-21:09:49.048918 7ffae6bff6c0 Delete type=0 #105 -2025/02/06-21:09:49.049103 7ffae6bff6c0 Manual compaction at level-0 from '!folders!DD8331Hda4rhvEf9' @ 72057594037927935 : 1 .. '!items!zplzTG30QXHURusr' @ 0 : 0; will stop at (end) -2025/02/06-21:09:49.049145 7ffae6bff6c0 Manual compaction at level-1 from '!folders!DD8331Hda4rhvEf9' @ 72057594037927935 : 1 .. '!items!zplzTG30QXHURusr' @ 0 : 0; will stop at (end) +2025/02/06-21:12:01.561879 7ffae7fff6c0 Recovering log #110 +2025/02/06-21:12:01.618398 7ffae7fff6c0 Delete type=3 #108 +2025/02/06-21:12:01.618459 7ffae7fff6c0 Delete type=0 #110 diff --git a/packs-system/skills/LOG.old b/packs-system/skills/LOG.old index e4493ba..9cf5faf 100644 --- a/packs-system/skills/LOG.old +++ b/packs-system/skills/LOG.old @@ -1,8 +1,8 @@ -2025/02/01-21:14:17.990919 7fd1caffd6c0 Recovering log #98 -2025/02/01-21:14:18.007782 7fd1caffd6c0 Delete type=3 #96 -2025/02/01-21:14:18.007839 7fd1caffd6c0 Delete type=0 #98 -2025/02/01-21:17:36.962718 7fd1c93ff6c0 Level-0 table #103: started -2025/02/01-21:17:36.962748 7fd1c93ff6c0 Level-0 table #103: 0 bytes OK -2025/02/01-21:17:36.968886 7fd1c93ff6c0 Delete type=0 #101 -2025/02/01-21:17:36.975842 7fd1c93ff6c0 Manual compaction at level-0 from '!folders!DD8331Hda4rhvEf9' @ 72057594037927935 : 1 .. '!items!zplzTG30QXHURusr' @ 0 : 0; will stop at (end) -2025/02/01-21:17:36.986064 7fd1c93ff6c0 Manual compaction at level-1 from '!folders!DD8331Hda4rhvEf9' @ 72057594037927935 : 1 .. '!items!zplzTG30QXHURusr' @ 0 : 0; will stop at (end) +2025/02/06-21:10:37.808165 7ffae77fe6c0 Recovering log #106 +2025/02/06-21:10:37.818622 7ffae77fe6c0 Delete type=3 #104 +2025/02/06-21:10:37.818703 7ffae77fe6c0 Delete type=0 #106 +2025/02/06-21:11:20.037362 7ffae6bff6c0 Level-0 table #111: started +2025/02/06-21:11:20.037398 7ffae6bff6c0 Level-0 table #111: 0 bytes OK +2025/02/06-21:11:20.043269 7ffae6bff6c0 Delete type=0 #109 +2025/02/06-21:11:20.043465 7ffae6bff6c0 Manual compaction at level-0 from '!folders!DD8331Hda4rhvEf9' @ 72057594037927935 : 1 .. '!items!zplzTG30QXHURusr' @ 0 : 0; will stop at (end) +2025/02/06-21:11:20.043496 7ffae6bff6c0 Manual compaction at level-1 from '!folders!DD8331Hda4rhvEf9' @ 72057594037927935 : 1 .. '!items!zplzTG30QXHURusr' @ 0 : 0; will stop at (end) diff --git a/packs-system/skills/MANIFEST-000104 b/packs-system/skills/MANIFEST-000104 deleted file mode 100644 index 4f6d069ff5ead1614c3b36a0b718de2634ba6d75..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 139 zcmdmC8h9Xufss)vC$%g!CnZVGsj?)sJhM2}IX|}`u_&=5zlfcQ_1HlkMa8uIoRrj} zVnr7h3u9wLkCa4{qKq=vG)u;A1~8CU%q&UGEmo{5$f*i(H#P{2@CXemEiPj0g2+c* e=dB+raY=07np9SRS0Qms(TPREb diff --git a/packs-system/skills/MANIFEST-000112 b/packs-system/skills/MANIFEST-000112 new file mode 100644 index 0000000000000000000000000000000000000000..8e59b7b4d3cd5f656bd56343014dd2a48aac7f28 GIT binary patch literal 123 zcmdmC8h9Xufss)vC$%g!CnZVGsj?)sJhM2}IX|}`u_&=5zlfcQ_1HlkMa8uIoRrj} zVnr7h3u9wLkCa4{qKq=vG)u;A1~8CU%q&UGEmo{5$f*i(H#P{2@CXemEiPj0g2)>> TJ^9Ybz{pg{$-rF1@{S1rhxQ~z literal 0 HcmV?d00001 diff --git a/styles/protagonist.less b/styles/protagonist.less index c171909..10cbe63 100644 --- a/styles/protagonist.less +++ b/styles/protagonist.less @@ -223,6 +223,10 @@ .char-text { margin-left: 0.5rem; } + .d100 { + flex: 0; + max-width: 0.6rem; + } .form-group { flex: 0; padding-left: 5px; @@ -290,32 +294,6 @@ max-width: 18rem; } } - - .motivations { - display: grid; - grid-template-columns: repeat(2, 1fr); - gap: 4px; - .motivation { - display: flex; - align-items: center; - gap: 4px; - min-width: 14rem; - max-width: 14rem; - .controls { - min-width: 2rem; - max-width: 2rem; - } - .name { - min-width: 8rem; - max-width: 8rem; - } - .item-img { - width: 32px; - height: 32px; - margin: 4px 0 0 0; - } - } - } } .tab.protagonist-skills { @@ -336,8 +314,9 @@ display: flex; align-items: center; gap: 4px; - min-width: 10rem; - max-width: 10rem; + margin-left: 4px; + min-width: 12rem; + max-width: 12rem; .rollable:hover, .rollable:focus { text-shadow: 0 0 8px var(--color-shadow-primary); @@ -348,8 +327,8 @@ max-width: 2rem; } .name { - min-width: 8rem; - max-width: 8rem; + min-width: 11rem; + max-width: 11rem; } .item-img { width: 24px; @@ -405,6 +384,32 @@ } } + .motivations { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 4px; + .motivation { + display: flex; + align-items: center; + gap: 4px; + min-width: 14rem; + max-width: 14rem; + .controls { + min-width: 2rem; + max-width: 2rem; + } + .name { + min-width: 12rem; + max-width: 12rem; + } + .item-img { + width: 24px; + height: 24px; + margin: 4px 0 0 0; + } + } + } + .mentaldisorders { display: grid; grid-template-columns: repeat(2, 1fr); diff --git a/templates/protagonist-main.hbs b/templates/protagonist-main.hbs index 5709e92..27e504d 100644 --- a/templates/protagonist-main.hbs +++ b/templates/protagonist-main.hbs @@ -32,8 +32,9 @@
{{localize "CTHULHUETERNAL.Label.SAN"}}
- - + + {{formInput systemFields.san.fields.value value=system.san.value}} {{localize "CTHULHUETERNAL.Label.recovery"}}