StyleCop clean OpenRA.Game
This commit is contained in:
@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Delay for the end game notification in milliseconds.")]
|
||||
public int NotificationDelay = 1500;
|
||||
|
||||
public object Create(ActorInitializer init) { return new ConquestVictoryConditions(init.self, this); }
|
||||
public object Create(ActorInitializer init) { return new ConquestVictoryConditions(init.Self, this); }
|
||||
}
|
||||
|
||||
public class ConquestVictoryConditions : ITick, INotifyObjectivesUpdated
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public GlobalUpgradeManager(ActorInitializer init)
|
||||
{
|
||||
self = init.self;
|
||||
self = init.Self;
|
||||
techTree = self.Trait<TechTree>();
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Delay between the game over condition being met, and the game actually ending, in milliseconds.")]
|
||||
public readonly int GameOverDelay = 1500;
|
||||
|
||||
public object Create(ActorInitializer init) { return new MissionObjectives(init.world, this); }
|
||||
public object Create(ActorInitializer init) { return new MissionObjectives(init.World, this); }
|
||||
}
|
||||
|
||||
public class MissionObjectives : INotifyObjectivesUpdated, ISync, IResolveOrder
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public readonly string Notification = "Beacon";
|
||||
public readonly string PalettePrefix = "player";
|
||||
|
||||
public object Create(ActorInitializer init) { return new PlaceBeacon(init.self, this); }
|
||||
public object Create(ActorInitializer init) { return new PlaceBeacon(init.Self, this); }
|
||||
}
|
||||
|
||||
public class PlaceBeacon : IResolveOrder
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Attach this to the player actor to collect observer stats.")]
|
||||
public class PlayerStatisticsInfo : ITraitInfo
|
||||
{
|
||||
public object Create(ActorInitializer init) { return new PlayerStatistics(init.self); }
|
||||
public object Create(ActorInitializer init) { return new PlayerStatistics(init.Self); }
|
||||
}
|
||||
|
||||
public class PlayerStatistics : ITick, IResolveOrder
|
||||
|
||||
@@ -41,9 +41,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
this.info = info;
|
||||
|
||||
var race = init.Contains<RaceInit>() ? init.Get<RaceInit, string>() : init.self.Owner.Country.Race;
|
||||
var race = init.Contains<RaceInit>() ? init.Get<RaceInit, string>() : init.Self.Owner.Country.Race;
|
||||
|
||||
Update(init.self.Owner, race);
|
||||
Update(init.Self.Owner, race);
|
||||
}
|
||||
|
||||
public IEnumerable<string> ProvidesPrerequisites
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public ProvidesTechPrerequisite(ProvidesTechPrerequisiteInfo info, ActorInitializer init)
|
||||
{
|
||||
this.info = info;
|
||||
var tech = init.world.Map.Options.TechLevel ?? init.world.LobbyInfo.GlobalSettings.TechLevel;
|
||||
var tech = init.World.Map.Options.TechLevel ?? init.World.LobbyInfo.GlobalSettings.TechLevel;
|
||||
this.enabled = info.Name == tech;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Delay for the end game notification in milliseconds.")]
|
||||
public int NotificationDelay = 1500;
|
||||
|
||||
public object Create(ActorInitializer init) { return new StrategicVictoryConditions(init.self, this); }
|
||||
public object Create(ActorInitializer init) { return new StrategicVictoryConditions(init.Self, this); }
|
||||
}
|
||||
|
||||
public class StrategicVictoryConditions : ITick, ISync, INotifyObjectivesUpdated
|
||||
|
||||
@@ -28,9 +28,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public TechTree(ActorInitializer init)
|
||||
{
|
||||
player = init.self.Owner;
|
||||
init.world.ActorAdded += ActorChanged;
|
||||
init.world.ActorRemoved += ActorChanged;
|
||||
player = init.Self.Owner;
|
||||
init.World.ActorAdded += ActorChanged;
|
||||
init.World.ActorRemoved += ActorChanged;
|
||||
}
|
||||
|
||||
public void ActorChanged(Actor a)
|
||||
|
||||
Reference in New Issue
Block a user