mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
Lint
This commit is contained in:
@@ -874,15 +874,26 @@ const gameLog = {
|
|||||||
|
|
||||||
await sqliteService.execute(
|
await sqliteService.execute(
|
||||||
(dbRow) => {
|
(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 (
|
if (
|
||||||
!currentGroup
|
!currentGroup ||
|
||||||
|| currentGroup.location !== location
|
currentGroup.location !== location ||
|
||||||
|| (
|
(created_at_ts - currentGroup.last_ts >
|
||||||
(created_at_ts - currentGroup.last_ts) > groupingTimeTolerance // groups multiple OnPlayerJoined and OnPlayerLeft together if they are within time tolerance limit
|
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
|
!(
|
||||||
)
|
prevEvent === 'OnPlayerJoined' &&
|
||||||
|
eventType === 'OnPlayerLeft'
|
||||||
|
)) // allows OnPlayerLeft to connect with nearby OnPlayerJoined
|
||||||
) {
|
) {
|
||||||
currentGroup = {
|
currentGroup = {
|
||||||
created_at: created_at_iso,
|
created_at: created_at_iso,
|
||||||
@@ -891,7 +902,7 @@ const gameLog = {
|
|||||||
worldName,
|
worldName,
|
||||||
groupName,
|
groupName,
|
||||||
events: [eventId],
|
events: [eventId],
|
||||||
last_ts: created_at_ts,
|
last_ts: created_at_ts
|
||||||
};
|
};
|
||||||
|
|
||||||
data.add(currentGroup);
|
data.add(currentGroup);
|
||||||
|
|||||||
Reference in New Issue
Block a user