Bug fixes

This commit is contained in:
Natsumi
2021-08-14 07:37:15 +12:00
parent c65134f67c
commit 20b4073cc1
3 changed files with 47 additions and 22 deletions

View File

@@ -109,13 +109,13 @@ namespace VRCX
{
cmdline = objects.Cast<ManagementBaseObject>().SingleOrDefault()?["CommandLine"]?.ToString();
}
isGameNoVR = cmdline.Contains("--no-vr");
}
catch
{
}
isGameRunning = true;
isGameNoVR = cmdline.Contains("--no-vr");
}
return new bool[]

View File

@@ -1140,40 +1140,40 @@ speechSynthesis.getVoices();
if (tags.includes('system_trust_legend')) {
ref.$trustLevel = 'Veteran User';
ref.$trustClass = 'x-tag-legend';
ref.$trustNum = 6;
ref.$trustSortNum = 6;
} else if (tags.includes('system_trust_veteran')) {
ref.$trustLevel = 'Trusted User';
ref.$trustClass = 'x-tag-veteran';
ref.$trustNum = 5;
ref.$trustSortNum = 5;
} else if (tags.includes('system_trust_trusted')) {
ref.$trustLevel = 'Known User';
ref.$trustClass = 'x-tag-trusted';
ref.$trustNum = 4;
ref.$trustSortNum = 4;
} else if (tags.includes('system_trust_known')) {
ref.$trustLevel = 'User';
ref.$trustClass = 'x-tag-known';
ref.$trustNum = 3;
ref.$trustSortNum = 3;
} else if (tags.includes('system_trust_basic')) {
ref.$trustLevel = 'New User';
ref.$trustClass = 'x-tag-basic';
ref.$trustNum = 2;
ref.$trustSortNum = 2;
} else {
ref.$trustLevel = 'Visitor';
ref.$trustClass = 'x-tag-untrusted';
ref.$trustNum = 1;
ref.$trustSortNum = 1;
}
ref.$trustColor = ref.$trustClass;
if (ref.$isTroll) {
ref.$trustColor = 'x-tag-troll';
ref.$trustNum += 0.1;
ref.$trustSortNum += 0.1;
}
if (ref.$isLegend) {
ref.$trustColor = 'x-tag-legendary';
ref.$trustNum += 0.2;
ref.$trustSortNum += 0.2;
}
if (ref.$isModerator) {
ref.$trustColor = 'x-tag-vip';
ref.$trustNum += 0.3;
ref.$trustSortNum += 0.3;
}
};
@@ -1243,7 +1243,7 @@ speechSynthesis.getVoices();
$trustLevel: 'Visitor',
$trustClass: 'x-tag-untrusted',
$trustColor: 'x-tag-untrusted',
$trustNum: 1,
$trustSortNum: 1,
$languages: [],
//
...json
@@ -1360,7 +1360,7 @@ speechSynthesis.getVoices();
$trustLevel: 'Visitor',
$trustClass: 'x-tag-untrusted',
$trustColor: 'x-tag-untrusted',
$trustNum: 1,
$trustSortNum: 1,
$languages: [],
//
...json
@@ -13546,11 +13546,23 @@ speechSynthesis.getVoices();
$app.methods.checkVRChatCache = async function (ref) {
var cacheDir = await this.getVRChatCacheDir();
return AssetBundleCacher.CheckVRChatCache(
ref.id,
ref.version,
cacheDir
);
var assetUrl = '';
for (var i = ref.unityPackages.length - 1; i > -1; i--) {
var unityPackage = ref.unityPackages[i];
if (
unityPackage.platform === 'standalonewindows' &&
this.compareUnityVersion(unityPackage.unityVersion)
) {
assetUrl = unityPackage.assetUrl;
break;
}
}
var id = extractFileId(assetUrl);
var version = parseInt(extractFileVersion(assetUrl), 10);
if (!id || !version) {
return [-1, 0];
}
return AssetBundleCacher.CheckVRChatCache(id, version, cacheDir);
};
$app.methods.queueCacheDownload = function (ref, type) {
@@ -13662,8 +13674,8 @@ speechSynthesis.getVoices();
await AssetBundleCacher.DownloadCacheFile(
cacheDir,
url,
ref.id,
ref.version,
fileId,
fileVersion,
sizeInBytes,
md5,
appVersion,
@@ -13978,7 +13990,20 @@ speechSynthesis.getVoices();
$app.methods.deleteVRChatCache = async function (ref) {
var cacheDir = await this.getVRChatCacheDir();
await AssetBundleCacher.DeleteCache(cacheDir, ref.id, ref.version);
var assetUrl = '';
for (var i = ref.unityPackages.length - 1; i > -1; i--) {
var unityPackage = ref.unityPackages[i];
if (
unityPackage.platform === 'standalonewindows' &&
this.compareUnityVersion(unityPackage.unityVersion)
) {
assetUrl = unityPackage.assetUrl;
break;
}
}
var id = extractFileId(assetUrl);
var version = parseInt(extractFileVersion(assetUrl), 10);
await AssetBundleCacher.DeleteCache(cacheDir, id, version);
this.getVRChatCacheSize();
this.updateVRChatWorldCache();
this.updateVRChatAvatarCache();
@@ -14492,7 +14517,7 @@ speechSynthesis.getVoices();
if (json.name > this.appVersion) {
for (var asset of json.assets) {
if (
asset.content_type === 'application/octet-stream' &&
asset.content_type === 'application/x-msdownload' &&
asset.state === 'uploaded'
) {
var downloadUrl = asset.browser_download_url;

View File

@@ -641,7 +641,7 @@ html
img.friends-list-avatar(v-lazy="scope.row.currentAvatarImageUrl" style="height:500px;cursor:pointer" @click="openExternalLink(scope.row.currentAvatarImageUrl)")
el-table-column(label="Display Name" min-width="130" prop="displayName" sortable :sort-method="(a, b) => sortAlphabetically(a, b, 'displayName')")
el-table-column(label="User Name" min-width="120" prop="username" sortable :sort-method="(a, b) => sortAlphabetically(a, b, 'username')")
el-table-column(label="Rank" width="110" prop="$trustNum" sortable="custom")
el-table-column(label="Rank" width="110" prop="$trustSortNum" sortable="custom")
template(v-once #default="scope")
span.name(v-text="scope.row.$trustLevel" :class="scope.row.$trustColor")
el-table-column(label="Status" min-width="180" prop="status" sortable :sort-method="(a, b) => sortStatus(a.status, b.status)")