From be51be573aaed45b925020f6b1f5881a96736a57 Mon Sep 17 00:00:00 2001 From: snap01 <43982555+snap01@users.noreply.github.com> Date: Sat, 10 Jun 2023 15:17:52 +0100 Subject: [PATCH 1/5] Fix adding (Any) specialisation skills to actors if both requiresname and picknameonly are not set --- module/actors/actor.js | 3 ++- module/items/item.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/actors/actor.js b/module/actors/actor.js index 7c9e42c9..600d52e1 100644 --- a/module/actors/actor.js +++ b/module/actors/actor.js @@ -929,6 +929,7 @@ export class CoCActor extends Actor { let addThis = true if (CoC7Item.isAnySpec(data)) { + const isAnyButNotFlagged = (!(data.system.properties?.requiresname) ?? false) && !(data.system.properties?.picknameonly ?? false) let skillList = [] const group = game.system.api.cocid.guessGroupFromDocument(data) if (group) { @@ -977,7 +978,7 @@ export class CoCActor extends Actor { } const skillData = await SkillSpecializationSelectDialog.create({ skills: skillList, - allowCustom: (data.system.properties?.requiresname ?? false), + allowCustom: (isAnyButNotFlagged || (data.system.properties?.requiresname ?? false)), fixedBaseValue: (data.system.properties?.keepbasevalue ?? false), specializationName: data.system.specialization, label: data.name, diff --git a/module/items/item.js b/module/items/item.js index 45a96097..d2a23150 100644 --- a/module/items/item.js +++ b/module/items/item.js @@ -313,7 +313,7 @@ export class CoC7Item extends Item { return [ game.i18n.localize('CoC7.AnySpecName').toLowerCase(), 'any' - ].includes(CoC7Item.getNameWithoutSpec(item).toLowerCase()) + ].includes(CONFIG.Item.documentClasses.skill.guessNameParts(item.name).skillName.toLowerCase()) } async checkSkillProperties () { From e47d29f60d8b00fbf6cdf4482e54de9e47b824a5 Mon Sep 17 00:00:00 2001 From: snap01 <43982555+snap01@users.noreply.github.com> Date: Sat, 10 Jun 2023 15:20:41 +0100 Subject: [PATCH 2/5] Update CHANGELOG.md --- .github/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index bc6153b2..bfdccb21 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -9,6 +9,8 @@ Happy gaming ! When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01. +- Fix adding (Any) specialisation skills to actors if both requiresname and picknameonly are not set + ## Version 0.10.1 When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01. From 973e7e21363bd85b75de9d6ddf54d83599c18911 Mon Sep 17 00:00:00 2001 From: snap01 <43982555+snap01@users.noreply.github.com> Date: Tue, 13 Jun 2023 21:15:25 +0100 Subject: [PATCH 3/5] Fix migrated skills with eras not having a CoC ID preventing migrate completing --- module/apps/coc-id-batch.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/apps/coc-id-batch.js b/module/apps/coc-id-batch.js index 354880ee..692a80e2 100644 --- a/module/apps/coc-id-batch.js +++ b/module/apps/coc-id-batch.js @@ -147,7 +147,7 @@ export class CoCIDBatch extends FormApplication { for (const item of actorData.items) { const itemData = item instanceof CONFIG.Item.documentClass ? item.toObject() : item if (itemData.type === 'skill') { - if (!itemData.flags.CoC7?.cocidFlag?.id.match(/^i.skill/)) { + if (!itemData.flags.CoC7?.cocidFlag?.id?.match(/^i.skill/)) { if (typeof missingNames[itemData.name] === 'undefined') { missingNames[itemData.name] = '' } @@ -167,7 +167,7 @@ export class CoCIDBatch extends FormApplication { for (const item of game.items.contents) { const itemData = item instanceof CONFIG.Item.documentClass ? item.toObject() : item if (itemData.type === 'skill') { - if (!itemData.flags.CoC7?.cocidFlag?.id.match(/^i.skill/)) { + if (!itemData.flags.CoC7?.cocidFlag?.id?.match(/^i.skill/)) { if (typeof missingNames[itemData.name] === 'undefined') { missingNames[itemData.name] = '' } @@ -189,7 +189,7 @@ export class CoCIDBatch extends FormApplication { for (const item of actorData.items ?? []) { const itemData = item instanceof CONFIG.Item.documentClass ? item.toObject() : item if (itemData.type === 'skill') { - if (!itemData.flags.CoC7?.cocidFlag?.id.match(/^i.skill/)) { + if (!itemData.flags.CoC7?.cocidFlag?.id?.match(/^i.skill/)) { if (typeof missingNames[itemData.name] === 'undefined') { missingNames[itemData.name] = '' } From 76a407dbe59cbfe168fdf9171534d8a72d291e4e Mon Sep 17 00:00:00 2001 From: snap01 <43982555+snap01@users.noreply.github.com> Date: Tue, 13 Jun 2023 21:17:23 +0100 Subject: [PATCH 4/5] Update CHANGELOG.md --- .github/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index bfdccb21..e6756280 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -10,6 +10,7 @@ Happy gaming ! When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01. - Fix adding (Any) specialisation skills to actors if both requiresname and picknameonly are not set +- Fix migrated skills with eras not having a CoC ID preventing migration completing ## Version 0.10.1 From 64485c73163564f0e79536466d83679ef830c249 Mon Sep 17 00:00:00 2001 From: snap01 <43982555+snap01@users.noreply.github.com> Date: Sun, 18 Jun 2023 11:38:11 +0100 Subject: [PATCH 5/5] Prepare for 0.10.2 release --- .github/CHANGELOG.md | 6 +++++- .github/ISSUE_TEMPLATE/bug-report.md | 1 + system.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index e6756280..d6e00811 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -1,7 +1,7 @@ # :warning: Important note - :warning: __MAKE A COPY OF YOUR WORLD BEFORE UPGRADING__ -- please report any bug encountered on GitHub, specify if you used V10 version. +- please report any bug encountered on GitHub Happy gaming ! @@ -9,6 +9,10 @@ Happy gaming ! When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01. +## Version 0.10.2 + +When not specified, all changes were made by @castanhocorreia, @HavlockV, and @snap01. + - Fix adding (Any) specialisation skills to actors if both requiresname and picknameonly are not set - Fix migrated skills with eras not having a CoC ID preventing migration completing diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index e0351f83..a3b49cd3 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -12,6 +12,7 @@ assignees: '' +- [ ] Have you checked the Upcoming Release section of the changelog to see if the issue will be resolved in the next release? https://github.com/Miskatonic-Investigative-Society/CoC7-FoundryVTT/blob/develop/.github/CHANGELOG.md - [ ] Are you running the latest version of both Foundry VTT and Call of Cthulhu 7th Edition? - [ ] Have you tested whether the bug persists without any other modules activated or on Foundry Launch in Safe Configuration? diff --git a/system.json b/system.json index 4be1a211..a536fb0e 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "CoC7", "title": "Call of Cthulhu 7th Edition", "description": "An implementation of the Call of Cthulhu 7th Edition game system for Foundry Virtual Tabletop.", - "version": "0.10.1", + "version": "0.10.2", "authors": [ { "name": "Miskatonic Investigative Society"