Skip to content

Commit

Permalink
ColorblindMode
Browse files Browse the repository at this point in the history
  • Loading branch information
Qkrisi committed Jan 18, 2021
1 parent 8e2cad0 commit 5c39925
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/KtaneModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ protected virtual void Start()
BombModule = GetComponent<KMBombModule>();
NeedyModule = GetComponent<KMNeedyModule>();
BossModule = GetComponent("KMBossModule");
Component ColorblindComponent = GetComponent("KMColorblindMode");
if (ColorblindComponent != null)
{
var ColorblindEnabled = ColorblindComponent.GetType().GetProperty("ColorblindModeActive", MainFlags);
if (ColorblindEnabled != null)
ColorblindMode = (bool) ColorblindEnabled.GetValue(ColorblindComponent, null);
}
if (BossModule != null)
IgnoredMethod = BossModule
.GetType()
Expand Down Expand Up @@ -195,6 +202,11 @@ protected int MaxID
/// Will be true if the module is played through the Unity editor
/// </summary>
protected bool IsTestHarness { get; private set; }

/// <summary>
/// Will be true if colorblind mode is enabled
/// </summary>
protected bool ColorblindMode { get; private set; }

#endregion

Expand Down

0 comments on commit 5c39925

Please sign in to comment.