added a way to create console commands

This commit is contained in:
Evil Factory
2021-09-25 20:33:17 -03:00
parent a058d0a1bc
commit 17ecef8c67
5 changed files with 19 additions and 3 deletions
@@ -113,7 +113,7 @@ namespace Barotrauma
private static readonly int messagesPerFile = 5000;
public const string SavePath = "ConsoleLogs";
private static void AssignOnExecute(string names, Action<string[]> onExecute)
public static void AssignOnExecute(string names, Action<string[]> onExecute)
{
var matchingCommand = commands.Find(c => c.names.Intersect(names.Split('|')).Count() > 0);
if (matchingCommand == null)