Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Veilza committed Aug 10, 2024
1 parent 4dd9439 commit ba12ffe
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
2 changes: 0 additions & 2 deletions system/actor/hunter-actor-sheet.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* global game, foundry, renderTemplate, ChatMessage, TextEditor, WOD5E, Dialog, WOD5E */

import { WOD5eDice } from '../scripts/system-rolls.js'
import { getActiveBonuses } from '../scripts/rolls/situational-modifiers.js'
import { WoDActor } from './wod-v5-sheet.js'

/**
Expand Down
2 changes: 1 addition & 1 deletion system/actor/scripts/item-roll.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const _onRollItem = async function (event) {
const decreaseRage = false
const title = item.name
const flavor = itemData.description
const flatMod = 0
const flatMod = 0
const macro = itemData.macroid
const selectors = []

Expand Down
2 changes: 1 addition & 1 deletion system/scripts/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const loadHelpers = async function () {
})

// Check whether an object is empty or not
Handlebars.registerHelper('isNotEmpty', function(obj) {
Handlebars.registerHelper('isNotEmpty', function (obj) {
return Object.keys(obj).length > 0
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const MigrateAbilitiesToAttributes = async function () {
await actor.update({ 'system.-=abilities': null })

// Update the actor's data with the new attributes information
await actor.update({ 'system': actorData })
await actor.update({ system: actorData })

// Send a notification and push the actor ID to the migration IDs list
ui.notifications.info(`Fixing actor ${actor.name}: Migrating abilities data to attributes.`)
Expand Down
15 changes: 9 additions & 6 deletions system/scripts/migration/migrate-rolldata-to-dicepools.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global ui, game, WOD5E */
/* global ui, game, WOD5E, foundry */

export const MigrateRolldataToDicepools = async function () {
const actorsList = game.actors
Expand Down Expand Up @@ -46,8 +46,11 @@ export const MigrateRolldataToDicepools = async function () {
}

// Remove unnecessary data
const { roll1, roll2, rollable, ...remainingSystem } = updatedItem.system;
updatedItem.system = remainingSystem;
const { roll1, roll2, rollable, ...remainingSystem } = updatedItem.system
roll1 = null
roll2 = null
rollable = null
updatedItem.system = remainingSystem

// Push the updated item to the array
updatedItems.push(updatedItem)
Expand All @@ -69,16 +72,16 @@ export const MigrateRolldataToDicepools = async function () {

const skillsList = WOD5E.Skills.getList({})
const attributesList = WOD5E.Attributes.getList({})

if (string in skillsList) {
return `skills.${string}`
} else if (string in attributesList) {
return `attributes.${string}`
} else if (string === 'discipline') {
if (data.discipline === 'rituals') {
return `disciplines.sorcery`
return 'disciplines.sorcery'
} else if (data.discipline === 'ceremonies') {
return `disciplines.oblivion`
return 'disciplines.oblivion'
} else {
return `disciplines.${data.discipline}`
}
Expand Down

0 comments on commit ba12ffe

Please sign in to comment.