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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user