Skip to content

Commit 61e7031

Browse files
committed
Some minor refactors
1 parent d7cb371 commit 61e7031

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

src/ts/effect-interface.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ class EffectInterface {
245245
* with the given UUID match the effect ID or name and are a convenient
246246
* effect
247247
*
248-
* @param options - The options to determine if the effect is applied
248+
* @param params - The parameters to determine if the effect is applied
249249
* @returns true if the effect is applied to the actor and is a convenient
250250
* effect, false otherwise
251251
*/
@@ -274,14 +274,14 @@ class EffectInterface {
274274
}
275275

276276
/**
277-
* Toggles the effect on the provided actor UUIDS as the GM via sockets. If
277+
* Toggles the effect on the provided actor UUIDs as the GM via sockets. If
278278
* no actor UUIDs are provided, it finds one of these in this priority:
279279
*
280280
* 1. The targeted tokens (if prioritize targets is enabled)
281281
* 2. The currently selected tokens on the canvas
282282
* 3. The user configured character
283283
*
284-
* @param options - the options for toggling an effect
284+
* @param params - the parameters for toggling an effect
285285
* @returns A promise that resolves when all effects are added
286286
*/
287287
async toggleEffect({
@@ -350,7 +350,7 @@ class EffectInterface {
350350
* Adds an effect matching the given params to the actor of the given UUID.
351351
* The effect adding is sent via a socket.
352352
*
353-
* @param options - the options for adding an effect
353+
* @param params - the parameters for adding an effect
354354
* @returns A promise that resolves when the effect is sent via the socket
355355
*/
356356
async addEffect({
@@ -398,7 +398,7 @@ class EffectInterface {
398398
* Removes an effect matching the given params from an actor of the given
399399
* UUID. The effect removal is sent via a socket.
400400
*
401-
* @param options - the options for removing an effect
401+
* @param params - the parameters for removing an effect
402402
* @returns A promise that resolves when the removal request is sent via the
403403
* socket
404404
*/
@@ -437,7 +437,7 @@ class EffectInterface {
437437
* Creates effects on either an existing folder with `folderId` or on a new
438438
* folder using the data provided by `folder`.
439439
*
440-
* @param options - the options for creating effects
440+
* @param params - the parameters for creating effects
441441
* @returns A promise that resolves when the effect creation is complete
442442
*/
443443
async createNewEffects({

src/ts/hooks/updateActiveEffect.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ const UpdateActiveEffect: Listener = {
1212
(activeEffect: any, _data, _metadata, _userId) => {
1313
const effect = activeEffect as ActiveEffect<any>;
1414

15-
if (
15+
const isConvenient =
1616
Flags.isConvenient(effect) &&
1717
effect.parent instanceof Item &&
18-
Flags.isConvenient(effect.parent)
19-
) {
18+
Flags.isConvenient(effect.parent);
19+
20+
if (isConvenient) {
2021
renderAppIfOpen();
2122
}
2223
// const statusesArray = Array.from(effect.statuses ?? []);

src/ts/settings.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ class Settings {
109109
}
110110

111111
#registerPrioritizeTargets(): void {
112+
// TODO consider making visible config?
112113
game.settings.register(MODULE_ID, this.#PRIORITIZE_TARGETS, {
113114
name: "Prioritize Targets",
114115
scope: "client",

0 commit comments

Comments
 (0)