Fix VRC launch again

This commit is contained in:
Natsumi
2022-09-27 10:34:19 +13:00
parent e885a18a80
commit 36d5bdbf5e
2 changed files with 77 additions and 38 deletions

View File

@@ -8844,6 +8844,20 @@ speechSynthesis.getVoices();
$app.data.photonEventTableFilter = '';
$app.data.photonEventTableTypeFilter = [];
$app.data.photonEventTableTypeOverlayFilter = [];
$app.data.photonEventTableTypeFilterList = [
'Event',
'OnPlayerJoined',
'OnPlayerLeft',
'AvatarChange',
'ChangeStatus',
'PortalSpawn',
'DeletedPortal',
'ChatBoxMessage',
'Moderation',
'PhotonMasterMigrate',
'PhotonBot'
];
$app.methods.photonEventTableFilterChange = function () {
this.photonEventTable.filters[0].value = this.photonEventTableFilter;
@@ -8859,6 +8873,10 @@ speechSynthesis.getVoices();
'VRCX_photonEventTypeFilter',
JSON.stringify(this.photonEventTableTypeFilter)
);
configRepository.setString(
'VRCX_photonEventTypeOverlayFilter',
JSON.stringify(this.photonEventTableTypeOverlayFilter)
);
};
$app.data.photonEventTable = {
@@ -8926,8 +8944,8 @@ speechSynthesis.getVoices();
};
this.photonEventTable.data.unshift(feed);
if (
this.photonEventTableTypeFilter.length > 0 &&
!this.photonEventTableTypeFilter.includes(feed.type)
this.photonEventTableTypeOverlayFilter.length > 0 &&
!this.photonEventTableTypeOverlayFilter.includes(feed.type)
) {
return;
}
@@ -9313,27 +9331,38 @@ speechSynthesis.getVoices();
} else if (eventData.EventName === 'ConfigurePortal') {
var shortName = eventData.Data[0];
var displayName = this.getDisplayNameFromPhotonId(senderId);
API.getInstanceFromShortName({shortName}).then((args) => {
var location = args.json.location;
var newShortName = args.json.shortName;
var ref = {
id: this.getUserIdFromPhotonId(senderId),
displayName
};
var portalType = 'Secure';
if (shortName === newShortName) {
portalType = 'Unlocked';
}
this.parsePhotonPortalSpawn(
datetime,
location,
ref,
portalType,
newShortName,
senderId
);
return args;
});
var ref = {
id: this.getUserIdFromPhotonId(senderId),
displayName
};
API.getInstanceFromShortName({shortName})
.then((args) => {
var location = args.json.location;
var newShortName = args.json.shortName;
var portalType = 'Secure';
if (shortName === newShortName) {
portalType = 'Unlocked';
}
this.parsePhotonPortalSpawn(
datetime,
location,
ref,
portalType,
newShortName,
senderId
);
return args;
})
.catch(() => {
this.parsePhotonPortalSpawn(
datetime,
location,
ref,
'Error',
shortName,
senderId
);
});
return;
} else if (eventData.EventName === '_SendOnSpawn') {
return;
@@ -9400,21 +9429,23 @@ speechSynthesis.getVoices();
shortName,
photonId
) {
var L = API.parseLocation(instanceId);
var name = instanceId;
try {
var args = await API.getCachedWorld({
worldId: L.worldId
});
name = args.ref.name;
} catch (err) {}
var worldName = shortName;
if (instanceId) {
var L = API.parseLocation(instanceId);
try {
var args = await API.getCachedWorld({
worldId: L.worldId
});
worldName = args.ref.name;
} catch (err) {}
}
this.addEntryPhotonEvent({
photonId,
text: `${portalType} PortalSpawn to ${name}`,
text: `${portalType} PortalSpawn to ${worldName}`,
type: 'PortalSpawn',
shortName,
location: instanceId,
worldName: name,
worldName,
created_at
});
this.addPhotonEventToGameLog({
@@ -9424,7 +9455,7 @@ speechSynthesis.getVoices();
location: this.lastLocation.location,
userId: ref.id,
instanceId,
worldName: name
worldName
});
};
@@ -11766,6 +11797,11 @@ speechSynthesis.getVoices();
$app.data.photonEventTablePrevious.filters[1].value =
$app.data.photonEventTableTypeFilter;
}
if (configRepository.getString('VRCX_photonEventTypeOverlayFilter')) {
$app.data.photonEventTableTypeOverlayFilter = JSON.parse(
configRepository.getString('VRCX_photonEventTypeOverlayFilter')
);
}
// App: Profile + Settings
@@ -16126,11 +16162,11 @@ speechSynthesis.getVoices();
$app.methods.launchGame = function (location, shortName) {
var D = this.launchDialog;
var args = '';
var args = [];
if (shortName) {
args = `vrchat://launch?id=${location}&shortName=${shortName}`;
args.push(`vrchat://launch?id=${location}&shortName=${shortName}`);
} else {
args = `vrchat://launch?id=${location}`;
args.push(`vrchat://launch?id=${location}`);
}
var {launchArguments, vrcLaunchPathOverride} = this.launchOptionsDialog;
if (launchArguments) {

View File

@@ -187,7 +187,7 @@ html
div.photon-event-table(v-if="photonLoggingEnabled")
div(style="position:absolute;margin-left:195px;z-index:1")
el-select(v-model="photonEventTableTypeFilter" @change="photonEventTableFilterChange" multiple clearable collapse-tags style="flex:1" placeholder="Filter")
el-option(v-once v-for="type in ['AvatarChange', 'ChangeStatus', 'PortalSpawn', 'DeletedPortal', 'ChatBoxMessage', 'Event', 'PhotonMasterMigrate', 'PhotonBot', 'OnPlayerJoined', 'OnPlayerLeft', 'Moderation']" :key="type" :label="type" :value="type")
el-option(v-once v-for="type in photonEventTableTypeFilterList" :key="type" :label="type" :value="type")
el-input(v-model="photonEventTableFilter" @input="photonEventTableFilterChange" placeholder="Search" clearable style="width:150px;margin-left:10px")
el-tooltip(placement="bottom" content="VRCX Companion Status" :disabled="hideTooltips")
div(style="display:inline-block;margin-left:15px;font-size:14px;vertical-align:text-top;margin-top:1px")
@@ -1326,6 +1326,9 @@ html
el-radio-button(label="VIP")
el-radio-button(label="Friends")
el-radio-button(label="Everyone")
div.options-container-item
el-select(v-model="photonEventTableTypeOverlayFilter" @change="photonEventTableFilterChange" multiple clearable collapse-tags style="flex:1" placeholder="Filter")
el-option(v-once v-for="type in photonEventTableTypeFilterList" :key="type" :label="type" :value="type")
span.sub-header User timeout HUD
div.options-container-item
span.name Enable