Skip to content

Commit

Permalink
Fixed a critical bug on the WEB Api
Browse files Browse the repository at this point in the history
Also improved the console output
  • Loading branch information
samuelfm committed Jul 4, 2019
1 parent 308a740 commit 4aa187d
Show file tree
Hide file tree
Showing 3 changed files with 272 additions and 182 deletions.
16 changes: 13 additions & 3 deletions AuthoringTools/GAIPS.AssetEditorTools/EditorUtilities.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System;

using System.Drawing;
using System.Windows.Forms;

namespace GAIPS.AssetEditorTools
{
public static class EditorUtilities
Expand All @@ -10,6 +12,14 @@ public static void DisplayProgressBar(string taskTitle, Action<IProgressBarContr
f.ShowDialog();
}


}
public static void AppendText(this RichTextBox box, string text, Color color)
{
box.SelectionStart = box.TextLength;
box.SelectionLength = 0;

box.SelectionColor = color;
box.AppendText(text);
box.SelectionColor = box.ForeColor;
}
}
}
2 changes: 1 addition & 1 deletion Web/WebAPIWF/APIMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class APIMethod
//GET METHODS (NO BODY)
public static APIMethod DECIDE = new APIMethod() { Name = "decide", Params = "?c='char'", Type = "GET", Description = "Returns the actions decided by the character to execute." };
public static APIMethod CHARACTERS = new APIMethod() { Name = "characters", Type = "GET", Description = "Returns all loaded characters and their emotional state." };
public static APIMethod ASK = new APIMethod() { Name = "ask", Params = "?c='character'&h='belHead'&b='belBody'",Type = "GET", Description = "Returns the value of a belief for a given character" };
public static APIMethod ASK = new APIMethod() { Name = "ask", Params = "?c='character'&bh='belHead'&bb='belBody'",Type = "GET", Description = "Returns the value of a belief for a given character" };

//POST METHODS (BODY REQUIRED)
public static APIMethod RESET = new APIMethod() { Name = "reset", Type = "POST" , Description = "Reloads the scenario and all the characters."};
Expand Down
Loading

0 comments on commit 4aa187d

Please sign in to comment.