#168 Added restart track setting#169
Conversation
eclarke12
left a comment
There was a problem hiding this comment.
I will approve this PR once the noted changes are made, thanks!
|
|
||
| "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.
Please captialise the first letter of each translation key-part.
This should be "SETTINGS.RestartHypeTracksN"
| // 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.
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.
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.
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.
Please use let instead of var for consistency sake
| config: true, | ||
| onChange: async s => {} | ||
| }), | ||
| }) |
There was a problem hiding this comment.
Something weird going on with the indentation here. Please ensure it follows the same format as other settings.
Added restart track setting #168