@@ -4,11 +4,16 @@ import { profileStatMappings, playerMappings, galacticPowerMappings, speedModMap
44import { getSpeedModCount , getPipCount , countOffensePercentRolls } from "./mods.ts" ;
55import { ULLocation , relicChart , gearChart , starChart , activeChart } from "./locations.ts"
66
7+ function handleLastSeen ( player : PlayerResp ) : void {
8+ let lastSeen = new Date ( Number ( player . lastActivityTime ) ) . toLocaleString ( ) ;
9+ ULLocation ( "mainList" , `Last Seen: ${ lastSeen } ` ) ;
10+ }
11+
712function handleProfileStat ( player : PlayerResp ) : void {
813 profileStatMappings . forEach ( stat => {
914 const playerStat = player . profileStat . find ( ps => ps . index === stat . index ) ;
1015 if ( playerStat ) {
11- ULLocation ( "profileStatList" , `${ stat . displayName } : ${ playerStat . value } ` ) ;
16+ ULLocation ( "profileStatList" , `${ stat . displayName } : ${ Number ( playerStat . value ) . toLocaleString ( ) } ` ) ;
1217 }
1318 } ) ;
1419}
@@ -17,7 +22,7 @@ function handleGP(player: PlayerResp): void {
1722 galacticPowerMappings . forEach ( stat => {
1823 const playerStat = player . profileStat . find ( ps => ps . index === stat . index )
1924 if ( playerStat ) {
20- ULLocation ( "GPList" , `${ stat . displayName } : ${ playerStat . value } ` ) ;
25+ ULLocation ( "GPList" , `${ stat . displayName } : ${ Number ( playerStat . value ) . toLocaleString ( ) } ` ) ;
2126 }
2227 } ) ;
2328}
@@ -101,9 +106,9 @@ function handleOffenseMods(player: PlayerResp): void {
101106function handlePips ( player : PlayerResp ) : void {
102107 const { sixDot, fiveDot, other } = getPipCount ( player ) ;
103108
104- ULLocation ( "pipList" , `${ pipMappings . sixDot } : ${ sixDot } ` ) ;
105- ULLocation ( "pipList" , `${ pipMappings . fiveDot } : ${ fiveDot } ` ) ;
106- ULLocation ( "pipList" , `${ pipMappings . other } : ${ other } ` ) ;
109+ ULLocation ( "pipList" , `${ pipMappings . sixDot } : ${ sixDot . toLocaleString ( ) } ` ) ;
110+ ULLocation ( "pipList" , `${ pipMappings . fiveDot } : ${ fiveDot . toLocaleString ( ) } ` ) ;
111+ ULLocation ( "pipList" , `${ pipMappings . other } : ${ other . toLocaleString ( ) } ` ) ;
107112}
108113
109114function handleStars ( player : PlayerResp ) : void {
@@ -149,6 +154,10 @@ export async function FillList(allyCode: string) {
149154
150155 switch ( playerMappings [ key ] . displayType ) {
151156 case 0 :
157+ if ( playerMappings [ key ] . displayName == "Player Allycode" ) {
158+ ULLocation ( "mainList" , `${ playerMappings [ key ] . displayName } : ${ Number ( player [ key ] ) . toLocaleString ( "en-US" ) . replace ( / , / g, "-" ) } ` ) ;
159+ break ;
160+ }
152161 ULLocation ( "mainList" , `${ playerMappings [ key ] . displayName } : ${ player [ key ] } ` ) ;
153162 break ;
154163 case 1 :
@@ -176,7 +185,10 @@ export async function FillList(allyCode: string) {
176185 handleActivated ( player , units ) ;
177186 break ;
178187 case 9 :
179- handleOffenseMods ( player )
188+ handleOffenseMods ( player ) ;
189+ break ;
190+ case 10 :
191+ handleLastSeen ( player ) ;
180192 break ;
181193 default :
182194 console . error ( `Found unknown playerMappings key: ${ key } ` )
0 commit comments