StyleCop clean OpenRA.Mods.RA

This commit is contained in:
Matthias Mailänder
2015-01-04 16:49:45 +01:00
parent 2691f16a81
commit 1b0e3a7a7f
39 changed files with 414 additions and 398 deletions

View File

@@ -41,12 +41,12 @@ namespace OpenRA.Mods.RA.Widgets.Logic
PopulateObjectivesList(mo, objectivesPanel, template);
Action<Player> RedrawObjectives = player =>
Action<Player> redrawObjectives = player =>
{
if (player == lp)
PopulateObjectivesList(mo, objectivesPanel, template);
};
mo.ObjectiveAdded += RedrawObjectives;
mo.ObjectiveAdded += redrawObjectives;
}
void PopulateObjectivesList(MissionObjectives mo, ScrollPanelWidget parent, ContainerWidget template)

View File

@@ -85,7 +85,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
if (lp != null)
{
Action<Player> StartBlinking = player =>
Action<Player> startBlinking = player =>
{
if (player == world.LocalPlayer)
blinking = true;
@@ -94,7 +94,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
var mo = lp.PlayerActor.TraitOrDefault<MissionObjectives>();
if (mo != null)
mo.ObjectiveAdded += StartBlinking;
mo.ObjectiveAdded += startBlinking;
}
}

View File

@@ -66,10 +66,10 @@ namespace OpenRA.Mods.RA.Widgets.Logic
advertiseCheckbox.OnClick = () => advertiseOnline ^= true;
allowPortForward = Game.Settings.Server.AllowPortForward;
var UPnPCheckbox = panel.Get<CheckboxWidget>("UPNP_CHECKBOX");
UPnPCheckbox.IsChecked = () => allowPortForward;
UPnPCheckbox.OnClick = () => allowPortForward ^= true;
UPnPCheckbox.IsDisabled = () => !Game.Settings.Server.NatDeviceAvailable;
var checkboxUPnP = panel.Get<CheckboxWidget>("UPNP_CHECKBOX");
checkboxUPnP.IsChecked = () => allowPortForward;
checkboxUPnP.OnClick = () => allowPortForward ^= true;
checkboxUPnP.IsDisabled = () => !Game.Settings.Server.NatDeviceAvailable;
var passwordField = panel.GetOrNull<PasswordFieldWidget>("PASSWORD");
if (passwordField != null)

View File

@@ -41,7 +41,7 @@ namespace OpenRA.Mods.RA.Widgets
{
var time = WidgetUtils.FormatTime(p.RemainingTime, false);
var text = Format.F(p.Info.Description, time);
var color = !p.Ready || Game.LocalTick % 50 < 25 ? p.Instances[0].self.Owner.Color.RGB : Color.White;
var color = !p.Ready || Game.LocalTick % 50 < 25 ? p.Instances[0].Self.Owner.Color.RGB : Color.White;
return Pair.New(text, color);
}).ToArray();
}

View File

@@ -183,7 +183,7 @@ namespace OpenRA.Mods.RA.Widgets
if (clicked != null)
{
if (!clicked.Power.Active)
Sound.PlayToPlayer(spm.self.Owner, clicked.Power.Info.InsufficientPowerSound);
Sound.PlayToPlayer(spm.Self.Owner, clicked.Power.Info.InsufficientPowerSound);
clicked.Power.Target();
}