Move Text handling to its own class

This commit is contained in:
teinarss
2021-06-03 19:33:32 +02:00
committed by reaperrr
parent 2a26ddc622
commit 82115c6bf7
25 changed files with 97 additions and 74 deletions

View File

@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Common.Commands
if (command.Value != null)
command.Value.InvokeCommand(name.ToLowerInvariant(), message.Substring(1 + name.Length).Trim());
else
Game.Debug("{0} is not a valid command.", name);
TextNotificationsManager.Debug("{0} is not a valid command.", name);
return false;
}

View File

@@ -66,7 +66,7 @@ namespace OpenRA.Mods.Common.Commands
if (!developerMode.Enabled)
{
Game.Debug("Cheats are disabled.");
TextNotificationsManager.Debug("Cheats are disabled.");
return;
}

View File

@@ -42,14 +42,14 @@ namespace OpenRA.Mods.Common.Commands
public void InvokeCommand(string name, string arg)
{
Game.Debug("Here are the available commands:");
TextNotificationsManager.Debug("Here are the available commands:");
foreach (var key in console.Commands.Keys)
{
if (!helpDescriptions.TryGetValue(key, out var description))
description = "no description available.";
Game.Debug("{0}: {1}", key, description);
TextNotificationsManager.Debug("{0}: {1}", key, description);
}
}