@@ -70,14 +70,14 @@ class LMRTFY {
70
70
LMRTFY . saveRollMethod = 'rollAbilitySave' ;
71
71
LMRTFY . abilityRollMethod = 'rollAbilityTest' ;
72
72
LMRTFY . skillRollMethod = 'rollSkill' ;
73
- LMRTFY . abilities = CONFIG . DND5E . abilities ;
73
+ LMRTFY . abilities = LMRTFY . create5eAbilities ( ) ;
74
74
LMRTFY . skills = CONFIG . DND5E . skills ;
75
- LMRTFY . saves = CONFIG . DND5E . abilities ;
75
+ LMRTFY . saves = LMRTFY . create5eAbilities ( ) ;
76
76
LMRTFY . normalRollEvent = { shiftKey : true , altKey : false , ctrlKey : false } ;
77
77
LMRTFY . advantageRollEvent = { shiftKey : false , altKey : true , ctrlKey : false } ;
78
78
LMRTFY . disadvantageRollEvent = { shiftKey : false , altKey : false , ctrlKey : true } ;
79
79
LMRTFY . specialRolls = { 'initiative' : true , 'deathsave' : true } ;
80
- LMRTFY . abilityAbbreviations = CONFIG . DND5E . abilityAbbreviations ;
80
+ LMRTFY . abilityAbbreviations = LMRTFY . create5eAbilities ( ) ;
81
81
LMRTFY . modIdentifier = 'mod' ;
82
82
LMRTFY . abilityModifiers = LMRTFY . parseAbilityModifiers ( ) ;
83
83
LMRTFY . canFailChecks = game . settings . get ( 'lmrtfy' , 'showFailButtons' ) ;
@@ -305,6 +305,18 @@ class LMRTFY {
305
305
306
306
return abilityMods ;
307
307
}
308
+
309
+ static create5eAbilities ( ) {
310
+ let abbr = { } ;
311
+
312
+ for ( let key in CONFIG . DND5E . abilities ) {
313
+ let abb = game . i18n . localize ( CONFIG . DND5E . abilities [ key ] . abbreviation ) ;
314
+ let upperFirstLetter = abb . charAt ( 0 ) . toUpperCase ( ) + abb . slice ( 1 ) ;
315
+ abbr [ `${ abb } ` ] = `DND5E.Ability${ upperFirstLetter } ` ;
316
+ }
317
+
318
+ return abbr ;
319
+ }
308
320
309
321
static onMessage ( data ) {
310
322
//console.log("LMRTF got message: ", data)
0 commit comments