Console Unify API Changes (#3059)

* Remove unused IChatCommand.

* Lots of refactoring into a shared context.

* Removed ICommonSession from server concmd Execute.

* Added argStr parameter to concmd execute.

* The execute function of client concmds now returns void, use the new shell.RemoteExecuteCommand function to forward commands.

* Finally move shells and commands into shared.

* Console commands can now be registered directly without a class in a shared context.

* Engine API Changes.

* Repair rebase damage.

* Update Submodule.
This commit is contained in:
Acruid
2021-02-01 16:49:43 -08:00
committed by GitHub
parent 80ad2ef5b7
commit 8b5d66050a
119 changed files with 820 additions and 796 deletions

View File

@@ -440,7 +440,7 @@ namespace Content.Client.UserInterface.AdminMenu
public override void ButtonPressed(ButtonEventArgs args)
{
IoCManager.Resolve<IClientConsole>().ProcessCommand(RequiredCommand);
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand(RequiredCommand);
}
}
#endregion
@@ -504,7 +504,7 @@ namespace Content.Client.UserInterface.AdminMenu
Name = "Pause",
Handler = () =>
{
IoCManager.Resolve<IClientConsole>().ProcessCommand("events pause");
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand("events pause");
},
},
new CommandUIButton
@@ -512,14 +512,14 @@ namespace Content.Client.UserInterface.AdminMenu
Name = "Resume",
Handler = () =>
{
IoCManager.Resolve<IClientConsole>().ProcessCommand("events resume");
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand("events resume");
},
},
};
public override void Submit()
{
IoCManager.Resolve<IClientConsole>().ProcessCommand($"events run \"{_eventsDropDown.GetValue()}\"");
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand($"events run \"{_eventsDropDown.GetValue()}\"");
}
}
@@ -548,7 +548,7 @@ namespace Content.Client.UserInterface.AdminMenu
public override void Submit()
{
IoCManager.Resolve<IClientConsole>().ProcessCommand($"kick \"{_playerDropDown.GetValue()}\" \"{CommandParsing.Escape(_reason.GetValue())}\"");
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand($"kick \"{_playerDropDown.GetValue()}\" \"{CommandParsing.Escape(_reason.GetValue())}\"");
}
}
@@ -572,7 +572,7 @@ namespace Content.Client.UserInterface.AdminMenu
public override void Submit()
{
IoCManager.Resolve<IClientConsole>().ProcessCommand($"tpto \"{_playerDropDown.GetValue()}\"");
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand($"tpto \"{_playerDropDown.GetValue()}\"");
}
}
@@ -596,7 +596,7 @@ namespace Content.Client.UserInterface.AdminMenu
public override void Submit()
{
IoCManager.Resolve<IClientConsole>().ProcessCommand($"addatmos {_grid.GetValue()}");
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand($"addatmos {_grid.GetValue()}");
}
}
@@ -639,7 +639,7 @@ namespace Content.Client.UserInterface.AdminMenu
public override void Submit()
{
IoCManager.Resolve<IClientConsole>().ProcessCommand($"fillgas {_grid.GetValue()} {_gas.GetValue()} {_amount.GetValue()}");
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand($"fillgas {_grid.GetValue()} {_gas.GetValue()} {_amount.GetValue()}");
}
}
#endregion