Skip to content

Commit

Permalink
Fix bug reporter, add missing migration, version numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
moo-man committed Jan 8, 2024
1 parent 74d79c6 commit 54e6ca6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
11 changes: 4 additions & 7 deletions scripts/apps/bug-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export default class BugReportFormWNG extends Application {
}

activateListeners(html) {

html.find(".bug-submit").click(ev => {
let data = {};
let form = $(ev.currentTarget).parents(".bug-report")[0];
Expand All @@ -94,15 +95,11 @@ export default class BugReportFormWNG extends Application {
data.issuer = $(form).find(".issuer")[0].value
let label = $(form).find(".issue-label")[0].value;


if (!data.domain || !data.title || !data.description)
return ui.notifications.error(game.i18n.localize("BugReport.ErrorForm"))
if (!data.issuer)
return ui.notifications.error(game.i18n.localize("BugReport.ErrorName1"))

if (!data.issuer.includes("@") && !data.issuer.includes("#"))
return ui.notifications.notify(game.i18n.localize("BugReport.ErrorName2"))

data.title = `[${this.domains[Number(data.domain)]}] ${data.title}`
data.description = data.description + `<br/>**From**: ${data.issuer}`

Expand All @@ -119,12 +116,12 @@ export default class BugReportFormWNG extends Application {

for (let mod of officialModules)
{
let modData = game.modules.get(mod[0]);
if (modData.active)
versions = versions.concat(`<br/>${mod[0]}: ${modData.version}`)
if (mod.active)
versions = versions.concat(`<br/>${mod.id}: ${mod.version}`)
}

data.description = data.description.concat(versions);
data.description += `<br/>Active Modules: ${game.modules.contents.filter(i => i.active).map(i => i.id).filter(i => !this.domainKeys.includes(i)).join(", ")}`

this.submit(data)
this.close()
Expand Down
1 change: 1 addition & 0 deletions scripts/common/migration.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ let v10Conversions = {
"wng-core.species-factions" : "wng-core.items",
"wng-core.spells" : "wng-core.items",
"wng-core.talents" : "wng-core.items",
"wng-core.mutations" : "wng-core.items",
"wng-forsaken.archetypes" : "wng-forsaken.items",
"wng-forsaken.species-factions" : "wng-forsaken.items",
"wng-forsaken.equipment" : "wng-forsaken.items",
Expand Down
4 changes: 2 additions & 2 deletions system.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name" : "wrath-and-glory",
"title": "Wrath & Glory",
"description": "The official system for Warhammer 40k Roleplay: Wrath & Glory! Time is running out in the 41st Millennium. This accursed age needs heroes more than ever before. Will you answer the call?",
"version": "5.0.1",
"version": "5.0.2",
"minimumCoreVersion" : 11,
"compatibility" : {
"minimum" : 11,
Expand Down Expand Up @@ -50,7 +50,7 @@
"url": "https://github.com/moo-man/WrathAndGlory-FoundryVTT",
"socket": true,
"manifest": "https://github.com/moo-man/WrathAndGlory-FoundryVTT/releases/latest/download/system.json",
"download": "https://github.com/moo-man/WrathAndGlory-FoundryVTT/releases/download/5.0.1/wrath-and-glory.zip",
"download": "https://github.com/moo-man/WrathAndGlory-FoundryVTT/releases/download/5.0.2/wrath-and-glory.zip",
"license": "LICENSE.txt"
}

0 comments on commit 54e6ca6

Please sign in to comment.