Skip to content

Commit

Permalink
fix log spam
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeroluna committed Nov 21, 2022
1 parent 5405783 commit bb566b9
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Chroma/Lighting/LightIDTableManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,19 +140,21 @@ internal static void UnregisterIndex(int lightID, int index)
{
foreach ((int key, int value) in dictioanry)
{
if (value == index)
if (value != index)
{
dictioanry.Remove(key);
if (ChromaConfig.Instance.PrintEnvironmentEnhancementDebug)
{
Log.Logger.Log($"Unregistered key [{key}] from light ID [{lightID}].");
}
continue;
}

return;
dictioanry.Remove(key);
if (ChromaConfig.Instance.PrintEnvironmentEnhancementDebug)
{
Log.Logger.Log($"Unregistered key [{key}] from light ID [{lightID}].");
}

Log.Logger.Log("Could not find key to unregister.", Logger.Level.Warning);
return;
}

Log.Logger.Log("Could not find key to unregister.", Logger.Level.Warning);
}
else
{
Expand Down

0 comments on commit bb566b9

Please sign in to comment.