adjust last seen format in game interface
This commit is contained in:
parent
e4535e09a0
commit
e843f839f5
@ -347,7 +347,7 @@ QueueEvent( request, eventType, notifyEntity )
|
||||
timedOut = "unset";
|
||||
}
|
||||
|
||||
if ( timedOut == "set")
|
||||
if ( timedOut == "set" )
|
||||
{
|
||||
LogDebug( "Timed out waiting for response..." );
|
||||
|
||||
@ -527,8 +527,8 @@ OnExecuteCommand( event )
|
||||
|
||||
OnSetClientDataCompleted( event )
|
||||
{
|
||||
// IW4MAdmin let us know it persisted (success or fail)
|
||||
LogDebug( "Set Client Data -> subtype = " + CoerceUndefined( event.subType ) + ", status = " + CoerceUndefined( event.data["status"] ) );
|
||||
data = ParseDataString( event.data );
|
||||
LogDebug( "Set Client Data -> subtype = " + CoerceUndefined( event.subType ) + ", status = " + CoerceUndefined( data["status"] ) );
|
||||
}
|
||||
|
||||
CoerceUndefined( object )
|
||||
|
@ -134,7 +134,7 @@ PlayerSpawnEvents()
|
||||
|
||||
self IPrintLnBold( "Welcome, your level is ^5" + clientData.permissionLevel );
|
||||
wait( 2.0 );
|
||||
self IPrintLnBold( "You were last seen ^5" + clientData.lastConnection );
|
||||
self IPrintLnBold( "You were last seen ^5" + clientData.lastConnection + " ago" );
|
||||
}
|
||||
|
||||
|
||||
@ -467,7 +467,7 @@ GetClosestPerformanceClientForTeam( sourceTeam, excluded )
|
||||
|
||||
else if ( candidateValue < closest )
|
||||
{
|
||||
scripts\_integration_base::LogDebug( candidateValue + " is the new best value ");
|
||||
scripts\_integration_base::LogDebug( candidateValue + " is the new best value " );
|
||||
choice = players[i];
|
||||
closest = candidateValue;
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ _GetPlayerFromClientNum( clientNum )
|
||||
return undefined;
|
||||
}
|
||||
|
||||
players = GetPlayers("all");
|
||||
players = GetPlayers( "all" );
|
||||
|
||||
for ( i = 0; i < players.size; i++ )
|
||||
{
|
||||
|
@ -12,11 +12,11 @@ OnPlayerConnect()
|
||||
for ( ;; )
|
||||
{
|
||||
level waittill( "connecting", player );
|
||||
player thread DisplaypopupsWaiter();
|
||||
player thread DisplayPopupsWaiter();
|
||||
}
|
||||
}
|
||||
|
||||
DisplaypopupsWaiter()
|
||||
DisplayPopupsWaiter()
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
self.ranknotifyqueue = [];
|
||||
|
@ -208,7 +208,7 @@ const plugin = {
|
||||
data = {
|
||||
level: client.level,
|
||||
clientId: client.clientId,
|
||||
lastConnection: client.lastConnection,
|
||||
lastConnection: client.timeSinceLastConnectionString,
|
||||
tag: tagMeta?.value ?? '',
|
||||
performance: clientStats?.performance ?? 200.0
|
||||
};
|
||||
|
@ -117,6 +117,9 @@ namespace SharedLibraryCore.Database.Models
|
||||
[NotMapped] public TeamType Team { get; set; }
|
||||
[NotMapped] public string TeamName { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string TimeSinceLastConnectionString => (DateTime.UtcNow - LastConnection).HumanizeForCurrentCulture();
|
||||
|
||||
[NotMapped]
|
||||
// this is kinda dirty, but I need localizable level names
|
||||
public ClientPermission ClientPermission => new ClientPermission
|
||||
|
Loading…
Reference in New Issue
Block a user