diff --git a/css/fvtt-cthulhu-eternal.css b/css/fvtt-cthulhu-eternal.css index 690b057..2e6caf6 100644 --- a/css/fvtt-cthulhu-eternal.css +++ b/css/fvtt-cthulhu-eternal.css @@ -567,8 +567,8 @@ i.fvtt-cthulhu-eternal { max-width: 8rem; } .fvtt-cthulhu-eternal .tab.protagonist-skills .skills .skill .item-img { - width: 32px; - height: 32px; + width: 24px; + height: 24px; margin: 4px 0 0 0; } .fvtt-cthulhu-eternal .tab.protagonist-status { @@ -609,8 +609,8 @@ i.fvtt-cthulhu-eternal { max-width: 2rem; } .fvtt-cthulhu-eternal .tab.protagonist-status .bonds .bond .item-img { - width: 32px; - height: 32px; + width: 24px; + height: 24px; margin: 4px 0 0 0; } .fvtt-cthulhu-eternal .tab.protagonist-status .mentaldisorders { @@ -634,8 +634,8 @@ i.fvtt-cthulhu-eternal { max-width: 14rem; } .fvtt-cthulhu-eternal .tab.protagonist-status .mentaldisorders .mentaldisorder .item-img { - width: 32px; - height: 32px; + width: 24px; + height: 24px; margin: 4px 0 0 0; } .fvtt-cthulhu-eternal .tab.protagonist-status .injuries { @@ -659,8 +659,8 @@ i.fvtt-cthulhu-eternal { max-width: 14rem; } .fvtt-cthulhu-eternal .tab.protagonist-status .injuries .injury .item-img { - width: 32px; - height: 32px; + width: 24px; + height: 24px; margin: 4px 0 0 0; } .fvtt-cthulhu-eternal .tab.protagonist-equipment { @@ -702,8 +702,8 @@ i.fvtt-cthulhu-eternal { max-width: 8rem; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .weapons .weapon .item-img { - width: 32px; - height: 32px; + width: 24px; + height: 24px; margin: 4px 0 0 0; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .armors { @@ -736,8 +736,8 @@ i.fvtt-cthulhu-eternal { max-width: 8rem; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .armors .armor .item-img { - width: 32px; - height: 32px; + width: 24px; + height: 24px; margin: 4px 0 0 0; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .gears { @@ -770,8 +770,8 @@ i.fvtt-cthulhu-eternal { max-width: 8rem; } .fvtt-cthulhu-eternal .tab.protagonist-equipment .gears .gear .item-img { - width: 32px; - height: 32px; + width: 24px; + height: 24px; margin: 4px 0 0 0; } .fvtt-cthulhu-eternal .tab.protagonist-equipment prose-mirror.inactive { diff --git a/lang/en.json b/lang/en.json index 0987ab5..deeb401 100644 --- a/lang/en.json +++ b/lang/en.json @@ -329,9 +329,9 @@ "Fast": "Fast", "Average": "Average", "None": "None", - "pristine": "Pristine", - "worn": "Worn", - "junk": "Junk", + "Pristine": "Pristine", + "Worn": "Worn", + "Junk": "Junk", "resources": "Resources", "resourceChecks": "Resource Checks", "sanBPShort": "BP", @@ -436,6 +436,10 @@ "Setting": { }, "Chat": { + }, + "Notitications": { + "NoWeaponSkill": "No weapon skill found for this weapon. Check Weapon definition or available skills/era", + "NoWeaponType": "No weapon type found for this weapon subtype. Check Weapon definition or available skills/era" } } } diff --git a/module/documents/roll.mjs b/module/documents/roll.mjs index baf0513..4876f50 100644 --- a/module/documents/roll.mjs +++ b/module/documents/roll.mjs @@ -135,10 +135,18 @@ export default class CthulhuEternalRoll extends Roll { return case "weapon": let era = game.settings.get("fvtt-cthulhu-eternal", "settings-era") + if (!SYSTEM.WEAPON_SKILL_MAPPING[era] || !SYSTEM.WEAPON_SKILL_MAPPING[era][options.rollItem.system.weaponType]) { + ui.notifications.error(game.i18n.localize("CTHULHUETERNAL.Notifications.NoWeaponType") ) + return + } let skillName = game.i18n.localize(SYSTEM.WEAPON_SKILL_MAPPING[era][options.rollItem.system.weaponType]) let actor = game.actors.get(options.actorId) options.weapon = options.rollItem options.rollItem = actor.items.find(i => i.type === "skill" && i.name.toLowerCase() === skillName.toLowerCase()) + if (!options.rollItem) { + ui.notifications.error(game.i18n.localize("CTHULHUETERNAL.Notifications.NoWeaponSkill") ) + return + } options.initialScore = options.rollItem.system.computeScore() console.log("WEAPON", skillName, era, options.rollItem) break diff --git a/packs-system/skills/CURRENT b/packs-system/skills/CURRENT index e146ef6..a9ebced 100644 --- a/packs-system/skills/CURRENT +++ b/packs-system/skills/CURRENT @@ -1 +1 @@ -MANIFEST-000044 +MANIFEST-000048 diff --git a/packs-system/skills/LOG b/packs-system/skills/LOG index 017b0cb..8f92da3 100644 --- a/packs-system/skills/LOG +++ b/packs-system/skills/LOG @@ -1,8 +1,3 @@ -2025/01/09-15:36:12.923109 7f0aba7fc6c0 Recovering log #42 -2025/01/09-15:36:12.933058 7f0aba7fc6c0 Delete type=3 #40 -2025/01/09-15:36:12.933138 7f0aba7fc6c0 Delete type=0 #42 -2025/01/09-15:36:31.742879 7f0ab9bff6c0 Level-0 table #47: started -2025/01/09-15:36:31.742910 7f0ab9bff6c0 Level-0 table #47: 0 bytes OK -2025/01/09-15:36:31.749117 7f0ab9bff6c0 Delete type=0 #45 -2025/01/09-15:36:31.749289 7f0ab9bff6c0 Manual compaction at level-0 from '!folders!DD8331Hda4rhvEf9' @ 72057594037927935 : 1 .. '!items!zplzTG30QXHURusr' @ 0 : 0; will stop at (end) -2025/01/09-15:36:31.759629 7f0ab9bff6c0 Manual compaction at level-1 from '!folders!DD8331Hda4rhvEf9' @ 72057594037927935 : 1 .. '!items!zplzTG30QXHURusr' @ 0 : 0; will stop at (end) +2025/01/09-15:39:16.704802 7f0abb7fe6c0 Recovering log #46 +2025/01/09-15:39:16.715860 7f0abb7fe6c0 Delete type=3 #44 +2025/01/09-15:39:16.715933 7f0abb7fe6c0 Delete type=0 #46 diff --git a/packs-system/skills/LOG.old b/packs-system/skills/LOG.old index d2c57e0..017b0cb 100644 --- a/packs-system/skills/LOG.old +++ b/packs-system/skills/LOG.old @@ -1,8 +1,8 @@ -2025/01/09-15:17:55.539834 7f0abb7fe6c0 Recovering log #38 -2025/01/09-15:17:55.549829 7f0abb7fe6c0 Delete type=3 #36 -2025/01/09-15:17:55.549903 7f0abb7fe6c0 Delete type=0 #38 -2025/01/09-15:18:10.246814 7f0ab9bff6c0 Level-0 table #43: started -2025/01/09-15:18:10.246843 7f0ab9bff6c0 Level-0 table #43: 0 bytes OK -2025/01/09-15:18:10.253720 7f0ab9bff6c0 Delete type=0 #41 -2025/01/09-15:18:10.253834 7f0ab9bff6c0 Manual compaction at level-0 from '!folders!DD8331Hda4rhvEf9' @ 72057594037927935 : 1 .. '!items!zplzTG30QXHURusr' @ 0 : 0; will stop at (end) -2025/01/09-15:18:10.253873 7f0ab9bff6c0 Manual compaction at level-1 from '!folders!DD8331Hda4rhvEf9' @ 72057594037927935 : 1 .. '!items!zplzTG30QXHURusr' @ 0 : 0; will stop at (end) +2025/01/09-15:36:12.923109 7f0aba7fc6c0 Recovering log #42 +2025/01/09-15:36:12.933058 7f0aba7fc6c0 Delete type=3 #40 +2025/01/09-15:36:12.933138 7f0aba7fc6c0 Delete type=0 #42 +2025/01/09-15:36:31.742879 7f0ab9bff6c0 Level-0 table #47: started +2025/01/09-15:36:31.742910 7f0ab9bff6c0 Level-0 table #47: 0 bytes OK +2025/01/09-15:36:31.749117 7f0ab9bff6c0 Delete type=0 #45 +2025/01/09-15:36:31.749289 7f0ab9bff6c0 Manual compaction at level-0 from '!folders!DD8331Hda4rhvEf9' @ 72057594037927935 : 1 .. '!items!zplzTG30QXHURusr' @ 0 : 0; will stop at (end) +2025/01/09-15:36:31.759629 7f0ab9bff6c0 Manual compaction at level-1 from '!folders!DD8331Hda4rhvEf9' @ 72057594037927935 : 1 .. '!items!zplzTG30QXHURusr' @ 0 : 0; will stop at (end) diff --git a/styles/protagonist.less b/styles/protagonist.less index 5185d45..c89dba4 100644 --- a/styles/protagonist.less +++ b/styles/protagonist.less @@ -344,8 +344,8 @@ max-width: 8rem; } .item-img { - width: 32px; - height: 32px; + width: 24px; + height: 24px; margin: 4px 0 0 0; } } @@ -389,8 +389,8 @@ max-width: 2rem; } .item-img { - width: 32px; - height: 32px; + width: 24px; + height: 24px; margin: 4px 0 0 0; } } @@ -414,8 +414,8 @@ max-width: 14rem; } .item-img { - width: 32px; - height: 32px; + width: 24px; + height: 24px; margin: 4px 0 0 0; } } @@ -439,8 +439,8 @@ max-width: 14rem; } .item-img { - width: 32px; - height: 32px; + width: 24px; + height: 24px; margin: 4px 0 0 0; } } @@ -485,8 +485,8 @@ max-width: 8rem; } .item-img { - width: 32px; - height: 32px; + width: 24px; + height: 24px; margin: 4px 0 0 0; } } @@ -519,8 +519,8 @@ max-width: 8rem; } .item-img { - width: 32px; - height: 32px; + width: 24px; + height: 24px; margin: 4px 0 0 0; } } @@ -553,8 +553,8 @@ max-width: 8rem; } .item-img { - width: 32px; - height: 32px; + width: 24px; + height: 24px; margin: 4px 0 0 0; } } diff --git a/templates/gear.hbs b/templates/gear.hbs index 670fd13..fda3b21 100644 --- a/templates/gear.hbs +++ b/templates/gear.hbs @@ -7,7 +7,7 @@