Move ctor initializers to their own line.
This commit is contained in:
@@ -164,7 +164,8 @@ namespace OpenRA.Mods.Common.FileFormats
|
||||
int baseOffset;
|
||||
int index;
|
||||
|
||||
public AudStream(Stream stream, int outputSize, int dataSize) : base(stream)
|
||||
public AudStream(Stream stream, int outputSize, int dataSize)
|
||||
: base(stream)
|
||||
{
|
||||
this.outputSize = outputSize;
|
||||
this.dataSize = dataSize;
|
||||
|
||||
@@ -137,7 +137,8 @@ namespace OpenRA.Mods.Common.FileFormats
|
||||
int outOffset;
|
||||
int currentBlock;
|
||||
|
||||
public WavStream(Stream stream, int dataSize, short blockAlign, short channels, int uncompressedSize) : base(stream)
|
||||
public WavStream(Stream stream, int dataSize, short blockAlign, short channels, int uncompressedSize)
|
||||
: base(stream)
|
||||
{
|
||||
this.channels = channels;
|
||||
numBlocks = dataSize / blockAlign;
|
||||
|
||||
@@ -69,7 +69,8 @@ namespace OpenRA.Mods.Common.Orders
|
||||
|
||||
public class PowerDownOrderGenerator : GlobalButtonOrderGenerator<ToggleConditionOnOrder>
|
||||
{
|
||||
public PowerDownOrderGenerator() : base("PowerDown") { }
|
||||
public PowerDownOrderGenerator()
|
||||
: base("PowerDown") { }
|
||||
|
||||
protected override bool IsValidTrait(ToggleConditionOnOrder t)
|
||||
{
|
||||
@@ -85,7 +86,8 @@ namespace OpenRA.Mods.Common.Orders
|
||||
|
||||
public class SellOrderGenerator : GlobalButtonOrderGenerator<Sellable>
|
||||
{
|
||||
public SellOrderGenerator() : base("Sell") { }
|
||||
public SellOrderGenerator()
|
||||
: base("Sell") { }
|
||||
|
||||
protected override string GetCursor(World world, CPos cell, int2 worldPixel, MouseInput mi)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,8 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
[ScriptGlobal("Actor")]
|
||||
public class ActorGlobal : ScriptGlobal
|
||||
{
|
||||
public ActorGlobal(ScriptContext context) : base(context) { }
|
||||
public ActorGlobal(ScriptContext context)
|
||||
: base(context) { }
|
||||
|
||||
[Desc("Create a new actor. initTable specifies a list of key-value pairs that defines the initial parameters for the actor's traits.")]
|
||||
public Actor Create(string type, bool addToWorld, LuaTable initTable)
|
||||
|
||||
@@ -15,7 +15,8 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
[ScriptGlobal("CPos")]
|
||||
public class CPosGlobal : ScriptGlobal
|
||||
{
|
||||
public CPosGlobal(ScriptContext context) : base(context) { }
|
||||
public CPosGlobal(ScriptContext context)
|
||||
: base(context) { }
|
||||
|
||||
[Desc("Create a new CPos with the specified coordinates.")]
|
||||
public CPos New(int x, int y) { return new CPos(x, y); }
|
||||
@@ -27,7 +28,8 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
[ScriptGlobal("CVec")]
|
||||
public class CVecGlobal : ScriptGlobal
|
||||
{
|
||||
public CVecGlobal(ScriptContext context) : base(context) { }
|
||||
public CVecGlobal(ScriptContext context)
|
||||
: base(context) { }
|
||||
|
||||
[Desc("Create a new CVec with the specified coordinates.")]
|
||||
public CVec New(int x, int y) { return new CVec(x, y); }
|
||||
@@ -39,7 +41,8 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
[ScriptGlobal("WPos")]
|
||||
public class WPosGlobal : ScriptGlobal
|
||||
{
|
||||
public WPosGlobal(ScriptContext context) : base(context) { }
|
||||
public WPosGlobal(ScriptContext context)
|
||||
: base(context) { }
|
||||
|
||||
[Desc("Create a new WPos with the specified coordinates.")]
|
||||
public WPos New(int x, int y, int z) { return new WPos(x, y, z); }
|
||||
@@ -51,7 +54,8 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
[ScriptGlobal("WVec")]
|
||||
public class WVecGlobal : ScriptGlobal
|
||||
{
|
||||
public WVecGlobal(ScriptContext context) : base(context) { }
|
||||
public WVecGlobal(ScriptContext context)
|
||||
: base(context) { }
|
||||
|
||||
[Desc("Create a new WVec with the specified coordinates.")]
|
||||
public WVec New(int x, int y, int z) { return new WVec(x, y, z); }
|
||||
@@ -63,7 +67,8 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
[ScriptGlobal("WDist")]
|
||||
public class WDistGlobal : ScriptGlobal
|
||||
{
|
||||
public WDistGlobal(ScriptContext context) : base(context) { }
|
||||
public WDistGlobal(ScriptContext context)
|
||||
: base(context) { }
|
||||
|
||||
[Desc("Create a new WDist.")]
|
||||
public WDist New(int r) { return new WDist(r); }
|
||||
|
||||
@@ -18,7 +18,8 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
[ScriptGlobal("Player")]
|
||||
public class PlayerGlobal : ScriptGlobal
|
||||
{
|
||||
public PlayerGlobal(ScriptContext context) : base(context) { }
|
||||
public PlayerGlobal(ScriptContext context)
|
||||
: base(context) { }
|
||||
|
||||
[Desc("Returns the player with the specified internal name, or nil if a match is not found.")]
|
||||
public Player GetPlayer(string name)
|
||||
|
||||
@@ -20,7 +20,8 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
{
|
||||
readonly RadarPings radarPings;
|
||||
|
||||
public RadarGlobal(ScriptContext context) : base(context)
|
||||
public RadarGlobal(ScriptContext context)
|
||||
: base(context)
|
||||
{
|
||||
radarPings = context.World.WorldActor.TraitOrDefault<RadarPings>();
|
||||
}
|
||||
|
||||
@@ -20,7 +20,8 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
[ScriptGlobal("Trigger")]
|
||||
public class TriggerGlobal : ScriptGlobal
|
||||
{
|
||||
public TriggerGlobal(ScriptContext context) : base(context) { }
|
||||
public TriggerGlobal(ScriptContext context)
|
||||
: base(context) { }
|
||||
|
||||
public static ScriptTriggers GetScriptTriggers(Actor a)
|
||||
{
|
||||
|
||||
@@ -31,7 +31,8 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
|
||||
internal Target Target;
|
||||
internal StateMachine FuzzyStateMachine;
|
||||
|
||||
public Squad(IBot bot, SquadManagerBotModule squadManager, SquadType type) : this(bot, squadManager, type, null) { }
|
||||
public Squad(IBot bot, SquadManagerBotModule squadManager, SquadType type)
|
||||
: this(bot, squadManager, type, null) { }
|
||||
|
||||
public Squad(IBot bot, SquadManagerBotModule squadManager, SquadType type, Actor target)
|
||||
{
|
||||
|
||||
@@ -39,7 +39,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
bool allowSpawn;
|
||||
|
||||
public FreeActor(ActorInitializer init, FreeActorInfo info) : base(info)
|
||||
public FreeActor(ActorInitializer init, FreeActorInfo info)
|
||||
: base(info)
|
||||
{
|
||||
allowSpawn = !init.Contains<FreeActorInit>() || init.Get<FreeActorInit>().ActorValue;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,11 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Sync]
|
||||
public bool IsTraitPaused { get; private set; }
|
||||
|
||||
protected PausableConditionalTrait(InfoType info) : base(info) { IsTraitPaused = info.PausedByDefault; }
|
||||
protected PausableConditionalTrait(InfoType info)
|
||||
: base(info)
|
||||
{
|
||||
IsTraitPaused = info.PausedByDefault;
|
||||
}
|
||||
|
||||
protected override void Created(Actor self)
|
||||
{
|
||||
|
||||
@@ -51,7 +51,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Sync]
|
||||
int damageThreshold;
|
||||
|
||||
public DamagedByTerrain(Actor self, DamagedByTerrainInfo info) : base(info)
|
||||
public DamagedByTerrain(Actor self, DamagedByTerrainInfo info)
|
||||
: base(info)
|
||||
{
|
||||
health = self.Trait<IHealth>();
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public class DetectCloaked : ConditionalTrait<DetectCloakedInfo>
|
||||
{
|
||||
public DetectCloaked(DetectCloakedInfo info) : base(info) { }
|
||||
public DetectCloaked(DetectCloakedInfo info)
|
||||
: base(info) { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public class RepairsUnits : PausableConditionalTrait<RepairsUnitsInfo>
|
||||
{
|
||||
public RepairsUnits(RepairsUnitsInfo info) : base(info) { }
|
||||
public RepairsUnits(RepairsUnitsInfo info)
|
||||
: base(info) { }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,9 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public class SpawnActorPower : SupportPower
|
||||
{
|
||||
public SpawnActorPower(Actor self, SpawnActorPowerInfo info) : base(self, info) { }
|
||||
public SpawnActorPower(Actor self, SpawnActorPowerInfo info)
|
||||
: base(self, info) { }
|
||||
|
||||
public override void Activate(Actor self, Order order, SupportPowerManager manager)
|
||||
{
|
||||
base.Activate(self, order, manager);
|
||||
|
||||
@@ -49,7 +49,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
int spawnCountdown;
|
||||
int actorsPresent;
|
||||
|
||||
public ActorSpawnManager(Actor self, ActorSpawnManagerInfo info) : base(info)
|
||||
public ActorSpawnManager(Actor self, ActorSpawnManagerInfo info)
|
||||
: base(info)
|
||||
{
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,8 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
Sprite hueSprite;
|
||||
|
||||
public HueSliderWidget() { }
|
||||
public HueSliderWidget(HueSliderWidget other) : base(other) { }
|
||||
public HueSliderWidget(HueSliderWidget other)
|
||||
: base(other) { }
|
||||
|
||||
public override void Initialize(WidgetArgs args)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,8 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
public class PasswordFieldWidget : TextFieldWidget
|
||||
{
|
||||
public PasswordFieldWidget() { }
|
||||
protected PasswordFieldWidget(PasswordFieldWidget widget) : base(widget) { }
|
||||
protected PasswordFieldWidget(PasswordFieldWidget widget)
|
||||
: base(widget) { }
|
||||
|
||||
protected override string GetApparentText() { return new string('*', Text.Length); }
|
||||
public override Widget Clone() { return new PasswordFieldWidget(this); }
|
||||
|
||||
Reference in New Issue
Block a user