Skip to content

Commit

Permalink
[KK, KKS, HS2] Add KoikatuAPI.IsVR
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco committed Oct 8, 2021
1 parent c7e0c9f commit 80c88bf
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/HS2API/KoikatuAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,14 @@ public static Version GetGameVersion()
//{
// return GameSystem.Instance.cultureNames.Length > 1;
//}

private static readonly bool _isVr = Application.productName == VRProcessName;
/// <summary>
/// Check if this is the official VR module. Main game VR mods are ignored (returns false).
/// </summary>
public static bool IsVR()
{
return _isVr;
}
}
}
9 changes: 9 additions & 0 deletions src/KKAPI/KoikatuAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,14 @@ public static bool IsDarkness()
{
return typeof(ChaControl).GetProperty("exType", AccessTools.all) != null;
}

private static readonly bool _isVr = Application.productName == VRProcessName || Application.productName == VRProcessNameSteam;
/// <summary>
/// Check if this is the official VR module. Main game VR mods are ignored (returns false).
/// </summary>
public static bool IsVR()
{
return _isVr;
}
}
}
9 changes: 9 additions & 0 deletions src/KKSAPI/KoikatuAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,14 @@ public static bool IsSteamRelease()
{
return false; //typeof(DownloadScene).GetProperty("isSteam", AccessTools.all) != null; //todo
}

private static readonly bool _isVr = Application.productName == VRProcessName;
/// <summary>
/// Check if this is the official VR module. Main game VR mods are ignored (returns false).
/// </summary>
public static bool IsVR()
{
return _isVr;
}
}
}

0 comments on commit 80c88bf

Please sign in to comment.