Skip to content

Commit 4aa187d

Browse files
committed
Fixed a critical bug on the WEB Api
Also improved the console output
1 parent 308a740 commit 4aa187d

File tree

3 files changed

+272
-182
lines changed

3 files changed

+272
-182
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using System;
2-
2+
using System.Drawing;
3+
using System.Windows.Forms;
4+
35
namespace GAIPS.AssetEditorTools
46
{
57
public static class EditorUtilities
@@ -10,6 +12,14 @@ public static void DisplayProgressBar(string taskTitle, Action<IProgressBarContr
1012
f.ShowDialog();
1113
}
1214

13-
14-
}
15+
public static void AppendText(this RichTextBox box, string text, Color color)
16+
{
17+
box.SelectionStart = box.TextLength;
18+
box.SelectionLength = 0;
19+
20+
box.SelectionColor = color;
21+
box.AppendText(text);
22+
box.SelectionColor = box.ForeColor;
23+
}
24+
}
1525
}

Web/WebAPIWF/APIMethods.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class APIMethod
1212
//GET METHODS (NO BODY)
1313
public static APIMethod DECIDE = new APIMethod() { Name = "decide", Params = "?c='char'", Type = "GET", Description = "Returns the actions decided by the character to execute." };
1414
public static APIMethod CHARACTERS = new APIMethod() { Name = "characters", Type = "GET", Description = "Returns all loaded characters and their emotional state." };
15-
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" };
15+
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" };
1616

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

0 commit comments

Comments
 (0)