File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
// ChatSetAttr version 1.6.2
2
- // Last Updated: 2017-10-02
2
+ // Last Updated: 2017-10-03
3
3
// A script to create, modify, or delete character attributes from the chat area or macros.
4
4
// If you don't like my choices for --replace, you can edit the replacers variable at your own peril to change them.
5
5
@@ -259,9 +259,9 @@ var chatSetAttr = chatSetAttr || (function () {
259
259
let moddedValue = parseFloat ( v ) + parseFloat ( attr . get ( k ) || '0' ) ;
260
260
if ( ! _ . isNaN ( moddedValue ) ) {
261
261
if ( opts . modb && k === 'current' ) {
262
- moddedValue = Math . min ( Math . max ( moddedValue , 0 ) , parseFloat ( attr . get ( 'max' ) || Infinity ) ) ;
262
+ moddedValue = Math . min ( Math . max ( moddedValue , 0 ) , parseFloat ( attr . get ( 'max' ) ) || Infinity ) ;
263
263
}
264
- newValue [ k ] = moddedValue . toString ( ) ;
264
+ newValue [ k ] = moddedValue ;
265
265
}
266
266
else {
267
267
delete newValue [ k ] ;
@@ -271,6 +271,7 @@ var chatSetAttr = chatSetAttr || (function () {
271
271
}
272
272
} ) ;
273
273
}
274
+ newValue = _ . mapObject ( newValue , v => String ( v ) ) ;
274
275
charFeedback [ attrName ] = newValue ;
275
276
setAttribute ( attr , newValue ) ;
276
277
} ) ;
Original file line number Diff line number Diff line change 1
1
// ChatSetAttr version 1.6.2
2
- // Last Updated: 2017-10-02
2
+ // Last Updated: 2017-10-03
3
3
// A script to create, modify, or delete character attributes from the chat area or macros.
4
4
// If you don't like my choices for --replace, you can edit the replacers variable at your own peril to change them.
5
5
@@ -259,9 +259,9 @@ var chatSetAttr = chatSetAttr || (function () {
259
259
let moddedValue = parseFloat ( v ) + parseFloat ( attr . get ( k ) || '0' ) ;
260
260
if ( ! _ . isNaN ( moddedValue ) ) {
261
261
if ( opts . modb && k === 'current' ) {
262
- moddedValue = Math . min ( Math . max ( moddedValue , 0 ) , parseFloat ( attr . get ( 'max' ) || Infinity ) ) ;
262
+ moddedValue = Math . min ( Math . max ( moddedValue , 0 ) , parseFloat ( attr . get ( 'max' ) ) || Infinity ) ;
263
263
}
264
- newValue [ k ] = moddedValue . toString ( ) ;
264
+ newValue [ k ] = moddedValue ;
265
265
}
266
266
else {
267
267
delete newValue [ k ] ;
@@ -271,6 +271,7 @@ var chatSetAttr = chatSetAttr || (function () {
271
271
}
272
272
} ) ;
273
273
}
274
+ newValue = _ . mapObject ( newValue , v => String ( v ) ) ;
274
275
charFeedback [ attrName ] = newValue ;
275
276
setAttribute ( attr , newValue ) ;
276
277
} ) ;
You can’t perform that action at this time.
0 commit comments