From afa3fa2593db23ce8f60f456fe7aa22cf38955a2 Mon Sep 17 00:00:00 2001 From: Victor Chelaru Date: Mon, 5 Feb 2024 07:49:17 -0700 Subject: [PATCH] Added support to display send tasks in the general output so they can be ordered. --- .../GlueControl/CommandSending/CommandSender.cs | 3 +++ .../GlueControl/MainCompilerPlugin.cs | 5 ++++- .../TaskDisplayer/TaskDisplayerControl.xaml | 1 + .../TaskDisplayer/TaskDisplayerViewModel.cs | 13 +++++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/FRBDK/Glue/GameCommunicationPlugin/GlueControl/CommandSending/CommandSender.cs b/FRBDK/Glue/GameCommunicationPlugin/GlueControl/CommandSending/CommandSender.cs index 7c22d86f4..115d7eb9f 100644 --- a/FRBDK/Glue/GameCommunicationPlugin/GlueControl/CommandSending/CommandSender.cs +++ b/FRBDK/Glue/GameCommunicationPlugin/GlueControl/CommandSending/CommandSender.cs @@ -51,6 +51,7 @@ internal set public static CommandSender Self { get; private set; } + #endregion static CommandSender() @@ -113,6 +114,7 @@ private CommandSender() { } if(CompilerViewModel.IsShowParametersChecked && CompilerViewModel.CommandParameterCheckboxVisibility == System.Windows.Visibility.Visible) { PrintOutput(text); + GlueCommands.Self.PrintOutput(text); PrintOutput("------------------------------------------"); } else @@ -124,6 +126,7 @@ private CommandSender() { } prefix = text.Substring(0, indexOfColon); } PrintOutput(prefix); + GlueCommands.Self.PrintOutput(prefix); } } diff --git a/FRBDK/Glue/GameCommunicationPlugin/GlueControl/MainCompilerPlugin.cs b/FRBDK/Glue/GameCommunicationPlugin/GlueControl/MainCompilerPlugin.cs index ad2e1225f..b21ca02dc 100644 --- a/FRBDK/Glue/GameCommunicationPlugin/GlueControl/MainCompilerPlugin.cs +++ b/FRBDK/Glue/GameCommunicationPlugin/GlueControl/MainCompilerPlugin.cs @@ -996,7 +996,10 @@ public async void ShowState(string stateName, string categoryName) await _refreshManager.PushGlueSelectionToGame(categoryName, stateName); } - + public void SetIsLoggingSentCommands(bool isLoggingSentCommands) + { + CompilerViewModel.IsPrintEditorToGameCheckboxChecked = isLoggingSentCommands; + } private void HandleGrabbedTreeNodeChanged(ITreeNode treeNode, TreeNodeAction action) diff --git a/FRBDK/Glue/Glue/Plugins/EmbeddedPlugins/TaskDisplayer/TaskDisplayerControl.xaml b/FRBDK/Glue/Glue/Plugins/EmbeddedPlugins/TaskDisplayer/TaskDisplayerControl.xaml index 86748ba5e..8159f8399 100644 --- a/FRBDK/Glue/Glue/Plugins/EmbeddedPlugins/TaskDisplayer/TaskDisplayerControl.xaml +++ b/FRBDK/Glue/Glue/Plugins/EmbeddedPlugins/TaskDisplayer/TaskDisplayerControl.xaml @@ -10,6 +10,7 @@ Log Queueing - if unchecked only processing is logged Log Plugin Calls Log File Watch + Log FRB->Game Commands diff --git a/FRBDK/Glue/Glue/Plugins/EmbeddedPlugins/TaskDisplayer/TaskDisplayerViewModel.cs b/FRBDK/Glue/Glue/Plugins/EmbeddedPlugins/TaskDisplayer/TaskDisplayerViewModel.cs index d96c71f17..8f587d6c6 100644 --- a/FRBDK/Glue/Glue/Plugins/EmbeddedPlugins/TaskDisplayer/TaskDisplayerViewModel.cs +++ b/FRBDK/Glue/Glue/Plugins/EmbeddedPlugins/TaskDisplayer/TaskDisplayerViewModel.cs @@ -43,6 +43,19 @@ public bool LogFileWatch } } + public bool LogGameCommunication + { + get => Get(); + set + { + if (Set(value)) + { + // send this to the game communication plugin: + PluginManager.CallPluginMethod("Glue Compiler", "SetIsLoggingSentCommands", value); + } + } + } + public TaskDisplayerViewModel() { TaskManager.Self.TaskAddedOrRemoved += HandleSyncTaskAddedOrRemoved;