File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 "id" : " rtscontrols" ,
33 "title" : " RTS Controls" ,
44 "description" : " This module will attempt to add RTS like controls to token movement using the Routinglib library." ,
5- "version" : " #{VERSION}# " ,
5+ "version" : " 1.0.7 " ,
66 "library" : " false" ,
77 "manifestPlusVersion" : " 1.2.0" ,
88 "compatibility" : {
4343 "path" : " languages/en.json"
4444 }
4545 ],
46- "url" : " #{URL}# " ,
47- "manifest" : " #{MANIFEST}# " ,
48- "download" : " #{DOWNLOAD}# " ,
46+ "url" : " https://github.com/Garsondee/RTSControls " ,
47+ "manifest" : " https://github.com/Garsondee/RTSControls/releases/download/1.0.7/module.json " ,
48+ "download" : " https://github.com/Garsondee/RTSControls/releases/download/1.0.7/module.zip " ,
4949 "license" : " LICENSE" ,
5050 "readme" : " README.md" ,
5151 "media" : [
Original file line number Diff line number Diff line change @@ -221,6 +221,11 @@ class MovementManager {
221221 color : movementColor ,
222222 } ;
223223
224+ // If the user is a GM then overide the 'isPaused' to always = false
225+ if ( game . user . isGM ) {
226+ movement . isPaused = false ;
227+ }
228+
224229 this . movements . set ( token . id , movement ) ;
225230 console . log ( `Movement object created for token ${ token . name } :` , movement ) ;
226231
@@ -231,8 +236,8 @@ class MovementManager {
231236 }
232237
233238 tick ( ) {
234- // Check if the game is paused and return early if it is
235- if ( game . paused ) {
239+ // If the game is paused and the user isn't a GM then return early
240+ if ( game . paused && ! game . user . isGM ) {
236241 console . log ( 'Game is paused, skipping tick.' ) ;
237242 return ;
238243 }
@@ -429,6 +434,13 @@ class MovementManager {
429434 return ;
430435 }
431436
437+ // If the game is paused then return early unless the user is has GM access
438+ if ( game . paused && ! game . user . isGM ) {
439+ ui . notifications . warn ( "Cannot pan camera while the game is paused." ) ;
440+ return ;
441+ }
442+
443+
432444 // Check if camera panning is allowed
433445 if ( ! this . allowCameraPanning ) {
434446 console . log ( "Camera panning has been cancelled." ) ;
You can’t perform that action at this time.
0 commit comments