Move Text handling to its own class
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace OpenRA.Mods.Common.Commands
|
||||
|
||||
if (!developerMode.Enabled)
|
||||
{
|
||||
Game.Debug("Cheats are disabled.");
|
||||
TextNotificationsManager.Debug("Cheats are disabled.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user