Upload files to "Managers"

This commit is contained in:
Deez committed 2026-11-26 14:43:51 -05:00
1 parent a3289ddec7
commit 1765940692
4 files changed
+188

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
using System;
namespace GorillaCaptions.Managers;
public static class Extensions
{
public static string GetPlatform(this VRRig rig)
{
string platformProperty = (string)rig.creator.GetPlayerRef().CustomProperties["platform"];
if (!string.IsNullOrEmpty(platformProperty))
return platformProperty;
if (HasOwnedCosmetic(rig, "S. FIRST LOGIN"))
return "STEAM";
if (HasOwnedCosmetic(rig, "FIRST LOGIN") ||
rig.creator != null && rig.creator.GetPlayerRef().CustomProperties.Count > 3 ||
rig.currentRankedSubTierPC > 0)
return "PC";
return "Quest";
}
private static bool HasOwnedCosmetic(VRRig rig, string cosmeticName)
{
if (rig._playerOwnedCosmetics == null)
return false;
foreach (string ownedCosmetic in rig._playerOwnedCosmetics)
{
if (string.IsNullOrEmpty(ownedCosmetic))
continue;
if (ownedCosmetic.IndexOf(cosmeticName, StringComparison.Ordinal) >= 0)
return true;
}
return false;
}
}