Skip to content

Commit

Permalink
fixed bug with verbosity levels and gem whereto response
Browse files Browse the repository at this point in the history
  • Loading branch information
patri0t86 committed Jul 6, 2020
1 parent 5cbff41 commit 70061bb
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions StateMachine/ChatManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ private void RespondWithPortals()

if (gemStrings.Count > 0)
{
sb.Length = 0;
sb.Capacity = 0;
sb.Capacity = 16;
count = 0;
for (int i = 0; i < gemStrings.Count; i++)
{
Expand All @@ -238,7 +241,6 @@ private void RespondWithPortals()
}
}
}

}
else if (gemStrings.Count > 0)
{
Expand Down Expand Up @@ -304,8 +306,6 @@ private void RespondWithPortals()
{
SendTell(Machine.CharacterMakingRequest, "I don't currently have any portals configured.");
}


}
}

Expand All @@ -332,14 +332,11 @@ private List<string> GetPortals()
private List<string> GetGems()
{
List<string> gemStrings = new List<string>();
for (int i = 0; i < Machine.Utility.BotSettings.GemSettings.Count; i++)
foreach (GemSetting gemSetting in Machine.Utility.BotSettings.GemSettings)
{
foreach (GemSetting gemSetting in Machine.Utility.BotSettings.GemSettings)
if (!string.IsNullOrEmpty(gemSetting.Keyword))
{
if (!string.IsNullOrEmpty(gemSetting.Keyword))
{
gemStrings.Add($"{gemSetting.Keyword} -> {gemSetting.Name}");
}
gemStrings.Add($"{gemSetting.Keyword} -> {gemSetting.Name}");
}
}
return gemStrings;
Expand Down

0 comments on commit 70061bb

Please sign in to comment.