-
-
Notifications
You must be signed in to change notification settings - Fork 18
#168 Added restart track setting #169
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will approve this PR once the noted changes are made, thanks!
@@ -6,6 +6,8 @@ | |||
|
|||
"SETTINGS.HypeTrackEnableN": "Enable Hype Track", | |||
"SETTINGS.HypeTrackEnableH": "Enable the ability to set a Track for an Actor", | |||
"SETTINGS.restartHypeTracksN": "Restart Hype Track", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please captialise the first letter of each translation key-part.
This should be "SETTINGS.RestartHypeTracksN"
async _stopHypeTrack() { | ||
if (!this.playlist || !isFirstGM()) return; | ||
|
||
// Stop the playlist if it is playing | ||
if (this.playlist.playing) { | ||
await this.playlist.stopAll(); | ||
await Playback.pauseAllTracks(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call doesn't pass the playlist to pauseAllTracks
, is that correct?
@@ -1,5 +1,9 @@ | |||
import * as MAESTRO from "./config.js"; | |||
|
|||
class PlaybackSettings{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of a static inner class, I'd prefer adding a property to the game.maestro
object. Eg. game.maestro.pausedTracks
or similar.
|
||
|
||
const restartHypeTracks = game.settings.get(MAESTRO.MODULE_NAME, MAESTRO.SETTINGS_KEYS.HypeTrack.restartHypeTracks); | ||
var resumeTime = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use let
instead of var
for consistency sake
const restartHypeTracks = game.settings.get(MAESTRO.MODULE_NAME, MAESTRO.SETTINGS_KEYS.HypeTrack.restartHypeTracks); | ||
if(restartHypeTracks && playlist.data && playlist.data.sounds) | ||
{ | ||
var sounds = playlist.data.sounds; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use let
instead of var
for consistency sake
@@ -31,7 +31,18 @@ export const registerModuleSettings = async function() { | |||
default: false, | |||
config: true, | |||
onChange: async s => {} | |||
}), | |||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something weird going on with the indentation here. Please ensure it follows the same format as other settings.
Added restart track setting #168