Commit b379c43 1 parent dc4b3ac commit b379c43 Copy full SHA for b379c43
File tree 2 files changed +57
-4
lines changed
2 files changed +57
-4
lines changed Original file line number Diff line number Diff line change @@ -295,3 +295,45 @@ export enum IndicatorType {
295
295
HIDDEN = 'HIDDEN' , // character is hidden
296
296
INVISIBLE = 'INVISIBLE' , // character is invisible
297
297
}
298
+
299
+ /**
300
+ * Map of mind states to their learning rate (0-34).
301
+ * https://elanthipedia.play.net/Experience#Mindstates
302
+ */
303
+ export const ExperienceMindStateMap : Record < string , number > = {
304
+ clear : 0 ,
305
+ dabbling : 1 ,
306
+ perusing : 2 ,
307
+ learning : 3 ,
308
+ thoughtful : 4 ,
309
+ thinking : 5 ,
310
+ considering : 6 ,
311
+ pondering : 7 ,
312
+ ruminating : 8 ,
313
+ concentrating : 9 ,
314
+ attentive : 10 ,
315
+ deliberative : 11 ,
316
+ interested : 12 ,
317
+ examining : 13 ,
318
+ understanding : 14 ,
319
+ absorbing : 15 ,
320
+ intrigued : 16 ,
321
+ scrutinizing : 17 ,
322
+ analyzing : 18 ,
323
+ studious : 19 ,
324
+ focused : 20 ,
325
+ 'very focused' : 21 ,
326
+ engaged : 22 ,
327
+ 'very engaged' : 23 ,
328
+ cogitating : 24 ,
329
+ fascinated : 25 ,
330
+ captivated : 26 ,
331
+ engrossed : 27 ,
332
+ riveted : 28 ,
333
+ 'very riveted' : 29 ,
334
+ rapt : 30 ,
335
+ 'very rapt' : 31 ,
336
+ enthralled : 32 ,
337
+ 'nearly locked' : 33 ,
338
+ 'mind lock' : 34 ,
339
+ } ;
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import type { ReactNode } from 'react';
7
7
import { useCallback , useEffect , useState } from 'react' ;
8
8
import * as rxjs from 'rxjs' ;
9
9
import { v4 as uuid } from 'uuid' ;
10
- import { GameEventType } from '../../common/game' ;
10
+ import { ExperienceMindStateMap , GameEventType } from '../../common/game' ;
11
11
import type {
12
12
ExperienceGameEvent ,
13
13
GameEvent ,
@@ -52,12 +52,23 @@ const GridPage: React.FC = (): ReactNode => {
52
52
const formatExperienceText = useCallback (
53
53
( gameEvent : ExperienceGameEvent ) : string => {
54
54
const { skill, rank, percent, mindState } = gameEvent ;
55
+ const mindStateRate = ExperienceMindStateMap [ mindState ] ;
56
+
55
57
const txtSkill = skill . padStart ( 15 ) ;
56
58
const txtRank = String ( rank ) . padStart ( 3 ) ;
57
59
const txtPercent = String ( percent ) . padStart ( 2 ) + '%' ;
58
- const txtMindState = mindState . padEnd ( 15 ) ;
59
- // TODO add option to show mind state as the numbers (x/34)
60
- return `${ txtSkill } ${ txtRank } ${ txtPercent } ${ txtMindState } ` ;
60
+
61
+ // TODO add user pref to toggle between mind state rate and mind state
62
+ const txtMindStateRate = `(${ mindStateRate } /34)` . padStart ( 7 ) ;
63
+ // const txtMindState = mindState.padEnd(15);
64
+
65
+ return [
66
+ txtSkill ,
67
+ txtRank ,
68
+ txtPercent ,
69
+ txtMindStateRate ,
70
+ // txtMindState,
71
+ ] . join ( ' ' ) ;
61
72
} ,
62
73
[ ]
63
74
) ;
You can’t perform that action at this time.
0 commit comments