Skip to content

Commit

Permalink
Update dependencies. Fix linting issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fyorl committed Sep 4, 2023
1 parent 3c80d16 commit c9c842b
Show file tree
Hide file tree
Showing 11 changed files with 738 additions and 1,157 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@
"jsdoc": {
"mode": "typescript",
"preferredTypes": {
".<>": "<>"
".<>": "<>",
"Object": "object"
},
"tagNamePreference": {
"auguments": "extends"
Expand Down
2 changes: 1 addition & 1 deletion dnd5e.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Hooks.once("init", function() {
CONFIG.Dice.D20Roll = dice.D20Roll;
CONFIG.MeasuredTemplate.defaults.angle = 53.13; // 5e cone RAW should be 53.13 degrees
CONFIG.ui.combat = applications.combat.CombatTracker5e;
CONFIG.compatibility.excludePatterns.push(/\bActiveEffect5e#label\b/); // backwards compatibility with v10
CONFIG.compatibility.excludePatterns.push(/\bActiveEffect5e#label\b/); // Backwards compatibility with v10.
game.dnd5e.isV10 = game.release.generation < 11;

// Register System Settings
Expand Down
3 changes: 2 additions & 1 deletion module/applications/item/item-sheet.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class ItemSheet5e extends ItemSheet {
".tab[data-tab=details]",
".tab[data-tab=effects] .items-list",
".tab[data-tab=description] .editor-content",
".tab[data-tab=advancement] .items-list",
".tab[data-tab=advancement] .items-list"
],
tabs: [{navSelector: ".tabs", contentSelector: ".sheet-body", initial: "description"}],
dragDrop: [
Expand Down Expand Up @@ -593,6 +593,7 @@ export default class ItemSheet5e extends ItemSheet {
* Handle the dropping of an advancement or item with advancements onto the advancements tab.
* @param {DragEvent} event The concluding DragEvent which contains drop data.
* @param {object} data The data transfer extracted from the event.
* @returns {Promise}
*/
async _onDropAdvancement(event, data) {
let advancements;
Expand Down
2 changes: 1 addition & 1 deletion module/dice/d20-roll.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export default class D20Roll extends Roll {
NORMAL: 0,
ADVANTAGE: 1,
DISADVANTAGE: -1
}
};

/* -------------------------------------------- */

Expand Down
14 changes: 8 additions & 6 deletions module/documents/item.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2028,7 +2028,7 @@ export default class Item5e extends Item {
* Pre-creation logic for the automatic configuration of owned weapon type Items.
* @param {object} data Data for the newly created item.
* @param {boolean} isNPC Is this actor an NPC?
* @returns {object} Updates to apply to the item data.
* @returns {object|void} Updates to apply to the item data.
* @private
*/
_onCreateOwnedWeapon(data, isNPC) {
Expand Down Expand Up @@ -2087,11 +2087,13 @@ export default class Item5e extends Item {
const scrollDetails = scrollDescription.slice(scrollIntroEnd + pdel.length);

// Create a composite description from the scroll description and the spell details
const desc = scrollIntro
+ `<hr><h3>${itemData.name} (${game.i18n.format("DND5E.LevelNumber", {level})})</h3>`
+ (components.concentration ? `<p><em>${game.i18n.localize("DND5E.ScrollRequiresConcentration")}</em></p>` : "")
+ `<hr>${description.value}<hr>`
+ `<h3>${game.i18n.localize("DND5E.ScrollDetails")}</h3><hr>${scrollDetails}`;
const desc = `
${scrollIntro}
<hr><h3>${itemData.name} (${game.i18n.format("DND5E.LevelNumber", {level})})</h3>
${(components.concentration ? `<p><em>${game.i18n.localize("DND5E.ScrollRequiresConcentration")}</em></p>` : "")}
<hr>${description.value}<hr>
<h3>${game.i18n.localize("DND5E.ScrollDetails")}</h3><hr>${scrollDetails}
`;

// Used a fixed attack modifier and saving throw according to the level of spell scroll.
if ( ["mwak", "rwak", "msak", "rsak"].includes(actionType) ) {
Expand Down
1 change: 1 addition & 0 deletions module/documents/macro.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Attempt to create a macro from the dropped data. Will use an existing macro if one exists.
* @param {object} dropData The dropped data
* @param {number} slot The hotbar slot to use
* @returns {Promise}
*/
export async function create5eMacro(dropData, slot) {
const macroData = { type: "script", scope: "actor" };
Expand Down
2 changes: 1 addition & 1 deletion module/migration.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const migrateWorld = async function() {
console.log(`Migrating RollTable document ${table.name}`);
await table.update(updateData, { enforceTypes: false });
}
} catch ( err ) {
} catch(err) {
err.message = `Failed dnd5e system migration for RollTable ${table.name}: ${err.message}`;
console.error(err);
}
Expand Down
Loading

0 comments on commit c9c842b

Please sign in to comment.