Mods.Common R# Console
Resharper corrections.
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
using OpenRA.Graphics;
|
using OpenRA.Graphics;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
|
||||||
@@ -56,12 +57,12 @@ namespace OpenRA.Mods.Common
|
|||||||
{
|
{
|
||||||
case "givecash":
|
case "givecash":
|
||||||
var order = new Order("DevGiveCash", world.LocalPlayer.PlayerActor, false);
|
var order = new Order("DevGiveCash", world.LocalPlayer.PlayerActor, false);
|
||||||
var cash = 0;
|
int cash;
|
||||||
|
|
||||||
if (int.TryParse(arg, out cash))
|
if (int.TryParse(arg, out cash))
|
||||||
order.ExtraData = (uint)cash;
|
order.ExtraData = (uint)cash;
|
||||||
|
|
||||||
Game.Debug("Giving {0} credits to player {1}.", (cash == 0 ? "cheat default" : cash.ToString()), world.LocalPlayer.PlayerName);
|
Game.Debug("Giving {0} credits to player {1}.", cash == 0 ? "cheat default" : cash.ToString(CultureInfo.InvariantCulture), world.LocalPlayer.PlayerName);
|
||||||
world.IssueOrder(order);
|
world.IssueOrder(order);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -19,9 +19,10 @@ namespace OpenRA.Mods.Common
|
|||||||
|
|
||||||
public class HelpCommand : IChatCommand, IWorldLoaded
|
public class HelpCommand : IChatCommand, IWorldLoaded
|
||||||
{
|
{
|
||||||
|
readonly Dictionary<string, string> helpDescriptions;
|
||||||
|
|
||||||
World world;
|
World world;
|
||||||
ChatCommands console;
|
ChatCommands console;
|
||||||
Dictionary<string, string> helpDescriptions;
|
|
||||||
|
|
||||||
public HelpCommand()
|
public HelpCommand()
|
||||||
{
|
{
|
||||||
@@ -43,7 +44,7 @@ namespace OpenRA.Mods.Common
|
|||||||
|
|
||||||
foreach (var key in console.Commands.Keys)
|
foreach (var key in console.Commands.Keys)
|
||||||
{
|
{
|
||||||
var description = "";
|
string description;
|
||||||
if (!helpDescriptions.TryGetValue(key, out description))
|
if (!helpDescriptions.TryGetValue(key, out description))
|
||||||
description = "no description available.";
|
description = "no description available.";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user