mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-21 07:43:50 +02:00
External event type
This commit is contained in:
@@ -6407,6 +6407,9 @@ speechSynthesis.getVoices();
|
||||
case 'Event':
|
||||
this.speak(noty.data);
|
||||
break;
|
||||
case 'External':
|
||||
this.speak(noty.message);
|
||||
break;
|
||||
case 'VideoPlay':
|
||||
this.speak(`Now playing: ${noty.notyName}`);
|
||||
break;
|
||||
@@ -6642,6 +6645,9 @@ speechSynthesis.getVoices();
|
||||
case 'Event':
|
||||
AppApi.XSNotification('VRCX', noty.data, timeout, image);
|
||||
break;
|
||||
case 'External':
|
||||
AppApi.XSNotification('VRCX', noty.message, timeout, image);
|
||||
break;
|
||||
case 'VideoPlay':
|
||||
AppApi.XSNotification(
|
||||
'VRCX',
|
||||
@@ -6909,6 +6915,9 @@ speechSynthesis.getVoices();
|
||||
case 'Event':
|
||||
AppApi.DesktopNotification('Event', noty.data, image);
|
||||
break;
|
||||
case 'External':
|
||||
AppApi.DesktopNotification('External', noty.message, image);
|
||||
break;
|
||||
case 'VideoPlay':
|
||||
AppApi.DesktopNotification('Now playing', noty.notyName, image);
|
||||
break;
|
||||
@@ -9532,6 +9541,14 @@ speechSynthesis.getVoices();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
case 'External':
|
||||
if (String(row.message).toUpperCase().includes(value)) {
|
||||
return true;
|
||||
}
|
||||
if (String(row.displayName).toUpperCase().includes(value)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
case 'VideoPlay':
|
||||
if (String(row.displayName).toUpperCase().includes(value)) {
|
||||
return true;
|
||||
@@ -14445,6 +14462,7 @@ speechSynthesis.getVoices();
|
||||
'group.queueReady': 'On',
|
||||
PortalSpawn: 'Everyone',
|
||||
Event: 'On',
|
||||
External: 'On',
|
||||
VideoPlay: 'Off',
|
||||
BlockedOnPlayerJoined: 'Off',
|
||||
BlockedOnPlayerLeft: 'Off',
|
||||
@@ -14482,6 +14500,7 @@ speechSynthesis.getVoices();
|
||||
'group.queueReady': 'On',
|
||||
PortalSpawn: 'Everyone',
|
||||
Event: 'On',
|
||||
External: 'On',
|
||||
VideoPlay: 'On',
|
||||
BlockedOnPlayerJoined: 'Off',
|
||||
BlockedOnPlayerLeft: 'Off',
|
||||
@@ -14525,6 +14544,10 @@ speechSynthesis.getVoices();
|
||||
$app.data.sharedFeedFilters.noty['group.queueReady'] = 'On';
|
||||
$app.data.sharedFeedFilters.wrist['group.queueReady'] = 'On';
|
||||
}
|
||||
if (!$app.data.sharedFeedFilters.noty.External) {
|
||||
$app.data.sharedFeedFilters.noty.External = 'On';
|
||||
$app.data.sharedFeedFilters.wrist.External = 'On';
|
||||
}
|
||||
|
||||
$app.data.trustColor = JSON.parse(
|
||||
configRepository.getString(
|
||||
@@ -23330,7 +23353,8 @@ speechSynthesis.getVoices();
|
||||
joinLeave: await database.getJoinLeaveTableSize(),
|
||||
portalSpawn: await database.getPortalSpawnTableSize(),
|
||||
videoPlay: await database.getVideoPlayTableSize(),
|
||||
event: await database.getEventTableSize()
|
||||
event: await database.getEventTableSize(),
|
||||
external: await database.getExternalTableSize()
|
||||
};
|
||||
};
|
||||
|
||||
@@ -23418,14 +23442,11 @@ speechSynthesis.getVoices();
|
||||
this.photonLoggingEnabled = true;
|
||||
configRepository.setBool('VRCX_photonLoggingEnabled', true);
|
||||
}
|
||||
if (!this.companionUpdateReminder && data.version < '1.1.3') {
|
||||
// check version
|
||||
this.promptCompanionUpdateReminder();
|
||||
}
|
||||
this.ipcEnabled = true;
|
||||
this.ipcTimeout = 60; // 30secs
|
||||
break;
|
||||
case 'MsgPing':
|
||||
this.externalNotifierVersion = data.version;
|
||||
break;
|
||||
case 'LaunchCommand':
|
||||
AppApi.FocusWindow();
|
||||
@@ -23439,16 +23460,7 @@ speechSynthesis.getVoices();
|
||||
}
|
||||
};
|
||||
|
||||
$app.data.companionUpdateReminder = false;
|
||||
|
||||
$app.methods.promptCompanionUpdateReminder = function () {
|
||||
this.$alert(
|
||||
'An update is required for it to function properly.',
|
||||
'VRCX Companion mod is out of date'
|
||||
);
|
||||
this.companionUpdateReminder = true;
|
||||
};
|
||||
|
||||
$app.data.externalNotifierVersion = 0;
|
||||
$app.data.photonEventCount = 0;
|
||||
$app.data.photonEventIcon = false;
|
||||
$app.data.customUserTags = new Map();
|
||||
@@ -23493,6 +23505,13 @@ speechSynthesis.getVoices();
|
||||
});
|
||||
break;
|
||||
case 'Noty':
|
||||
if (
|
||||
this.photonLoggingEnabled ||
|
||||
(this.externalNotifierVersion &&
|
||||
this.externalNotifierVersion > 21)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
var entry = {
|
||||
created_at: new Date().toJSON(),
|
||||
type: 'Event',
|
||||
@@ -23502,6 +23521,20 @@ speechSynthesis.getVoices();
|
||||
this.queueGameLogNoty(entry);
|
||||
this.addGameLog(entry);
|
||||
break;
|
||||
case 'External':
|
||||
var displayName = data.DisplayName ?? '';
|
||||
var entry = {
|
||||
created_at: new Date().toJSON(),
|
||||
type: 'External',
|
||||
message: data.Data,
|
||||
displayName,
|
||||
userId: data.UserId,
|
||||
location: this.lastLocation.location
|
||||
};
|
||||
database.addGamelogExternalToDatabase(entry);
|
||||
this.queueGameLogNoty(entry);
|
||||
this.addGameLog(entry);
|
||||
break;
|
||||
default:
|
||||
console.log('VRCXMessage:', data);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user