Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Plugins/IngameDebugConsole/Scripts/DebugLogConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public static class DebugLogConsole
{
public delegate bool ParseFunction( string input, out object output );

public delegate void CommandExecutedDelegate( string command, object[] parameters );
public static event CommandExecutedDelegate OnCommandExecuted;

// All the commands
private static readonly List<ConsoleMethodInfo> methods = new List<ConsoleMethodInfo>();
private static readonly List<ConsoleMethodInfo> matchingMethods = new List<ConsoleMethodInfo>( 4 );
Expand Down Expand Up @@ -212,6 +215,11 @@ public static void SearchAssemblyForConsoleMethods( Assembly assembly )
}
}

public static List<ConsoleMethodInfo> GetAllCommands()
{
return methods;
}

// Logs the list of available commands
public static void LogAllCommands()
{
Expand Down Expand Up @@ -745,6 +753,9 @@ public static void ExecuteCommand( string command )
else
Debug.Log( "Returned: " + result.ToString() );
}

if( OnCommandExecuted != null )
OnCommandExecuted( methodToExecute.command, parameters );
}
}

Expand Down Expand Up @@ -1507,4 +1518,4 @@ private static bool ParseVector( string input, Type vectorType, out object outpu
return true;
}
}
}
}