Skip to content

Commit

Permalink
Add IsDarkness() (like IsSteamRelease()) for KK
Browse files Browse the repository at this point in the history
  • Loading branch information
GeBo1 authored and ManlyMarco committed Jun 8, 2021
1 parent da99803 commit c490960
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/KKAPI/KoikatuAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,14 @@ public static bool IsSteamRelease()
{
return typeof(DownloadScene).GetProperty("isSteam", AccessTools.all) != null;
}

/// <summary>
/// Check if the game is running the Darkness version
/// <remarks>It's best to not rely on this and instead make the same code works either way (if possible).</remarks>
/// </summary>
public static bool IsDarkness()
{
return typeof(ChaControl).GetProperty("exType", AccessTools.all) != null;
}
}
}

0 comments on commit c490960

Please sign in to comment.