From 96dfe2fcef1731e8dcaf58a115397cc8ca1958dc Mon Sep 17 00:00:00 2001 From: Natsumi Date: Thu, 24 Jul 2025 21:42:59 +1200 Subject: [PATCH] Lint --- src/service/database/gameLog.js | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/src/service/database/gameLog.js b/src/service/database/gameLog.js index 32d1e96d..d6a60452 100644 --- a/src/service/database/gameLog.js +++ b/src/service/database/gameLog.js @@ -874,15 +874,26 @@ const gameLog = { await sqliteService.execute( (dbRow) => { - var [created_at_iso, created_at_ts, location, time, worldName, groupName, eventId, eventType] = dbRow; + var [ + created_at_iso, + created_at_ts, + location, + time, + worldName, + groupName, + eventId, + eventType + ] = dbRow; if ( - !currentGroup - || currentGroup.location !== location - || ( - (created_at_ts - currentGroup.last_ts) > groupingTimeTolerance // groups multiple OnPlayerJoined and OnPlayerLeft together if they are within time tolerance limit - && !(prevEvent === "OnPlayerJoined" && eventType === "OnPlayerLeft") // allows OnPlayerLeft to connect with nearby OnPlayerJoined - ) + !currentGroup || + currentGroup.location !== location || + (created_at_ts - currentGroup.last_ts > + groupingTimeTolerance && // groups multiple OnPlayerJoined and OnPlayerLeft together if they are within time tolerance limit + !( + prevEvent === 'OnPlayerJoined' && + eventType === 'OnPlayerLeft' + )) // allows OnPlayerLeft to connect with nearby OnPlayerJoined ) { currentGroup = { created_at: created_at_iso, @@ -891,7 +902,7 @@ const gameLog = { worldName, groupName, events: [eventId], - last_ts: created_at_ts, + last_ts: created_at_ts }; data.add(currentGroup);