Skip to content

Commit

Permalink
[HS2] Add KoikatuAPI.IsSteamRelease
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco committed Jun 6, 2022
1 parent 1dc6731 commit 2631eb5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/AIAPI/KoikatuAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public static Version GetGameVersion()
/// </summary>
public static bool IsSteamRelease()
{
// The jp version only has Japanese listed
return GameSystem.Instance.cultureNames.Length > 1;
}
}
Expand Down
17 changes: 9 additions & 8 deletions src/HS2API/KoikatuAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,15 @@ public static Version GetGameVersion()
return _gameVersion;
}

///// <summary>
///// Check if the game is the Steam release instead of the original Japanese release.
///// <remarks>It's best to not rely on this and instead make the same code work in both versions (if possible).</remarks>
///// </summary>
//public static bool IsSteamRelease()
//{
// return GameSystem.Instance.cultureNames.Length > 1;
//}
/// <summary>
/// Check if the game is the Steam release instead of the original Japanese release.
/// <remarks>It's best to not rely on this and instead make the same code work in both versions (if possible).</remarks>
/// </summary>
public static bool IsSteamRelease()
{
//return GameSystem.Instance.cultureNames.Length > 1; // this is no longer working in HS2 since jp version has all of the cultures listed despite not actually supporting them
return typeof(AIChara.ChaFileDefine).GetMethod("GetOriginalValueFromSteam", new[] { typeof(float), typeof(int) }) != null;
}

private static readonly bool _isVr = Application.productName == VRProcessName;
/// <summary>
Expand Down

0 comments on commit 2631eb5

Please sign in to comment.