1
1
var SafetyToolsAlert = ( function ( ) {
2
2
'use strict' ;
3
- var version = 0.5 ,
3
+ var version = 0.51 ,
4
4
author = 'James C. (Chuz)' ,
5
5
lastUpdated = 'Sep 16 2021' ;
6
6
@@ -20,6 +20,7 @@ var SafetyToolsAlert = (function() {
20
20
}
21
21
22
22
log ( '-=> SafetyToolAlerts v' + version + ' loaded <=-' ) ;
23
+ sendChat ( 'Safety Card Alerts' , '/w GM **Safety Card Alerts v' + version + ' loaded.**' ) ;
23
24
} ;
24
25
25
26
// Handler for when a graphic is added to the table
@@ -94,19 +95,23 @@ var SafetyToolsAlert = (function() {
94
95
if ( args . indexOf ( '-deckname' ) === 0 ) {
95
96
config . deckname = args . replace ( '-deckname' , '' ) . trim ( ) ;
96
97
state . safety_tools_alert . deckname = config . deckname ;
98
+ sendChat ( 'Safety Card Alerts' , '/w GM Deck name set to "' + config . deckname + '".' ) ;
97
99
} else if ( args . indexOf ( '-cardname_prefix' ) === 0 ) {
98
100
config . cardname_prefix = args . replace ( '-cardname_prefix' , '' ) . trim ( ) ;
99
101
state . safety_tools_alert . cardname_prefix = config . cardname_prefix ;
102
+ sendChat ( 'Safety Card Alerts' , '/w GM Card name prefix set to "' + config . cardname_prefix + '".' ) ;
100
103
} else if ( args . indexOf ( '-play_sound' ) === 0 ) {
101
104
var sound = args . replace ( '-play_sound' , '' ) . trim ( ) ;
102
105
if ( sound ) {
103
106
var track = findObjs ( { type : 'jukeboxtrack' , title : sound } ) [ 0 ] || '' ;
104
107
if ( track ) {
105
108
config . alert_sound = sound ;
106
109
config . play_sound = true ;
110
+ sendChat ( 'Safety Card Alerts' , '/w GM Alert sound set to "' + config . alert_sound + '". Sound playing enabled.' ) ;
107
111
} else {
108
112
config . alert_sound = '' ;
109
113
config . play_sound = false ;
114
+ sendChat ( 'Safety Card Alerts' , '/w GM Alert sound unset. Sound playing disabled.' ) ;
110
115
}
111
116
state . safety_tools_alert . alert_sound = config . alert_sound ;
112
117
state . safety_tools_alert . play_sound = config . play_sound ;
0 commit comments