Formatting fixes.
Spaces to tabs, indents, etc.
This commit is contained in:
@@ -71,7 +71,7 @@ namespace OpenRA.Scripting
|
|||||||
throw new InvalidOperationException("[LuaGlobal] attribute not found for global table '{0}'".F(type));
|
throw new InvalidOperationException("[LuaGlobal] attribute not found for global table '{0}'".F(type));
|
||||||
|
|
||||||
Name = names.First().Name;
|
Name = names.First().Name;
|
||||||
Bind(new [] { this });
|
Bind(new[] { this });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ namespace OpenRA.Scripting
|
|||||||
if (ctor == null)
|
if (ctor == null)
|
||||||
throw new InvalidOperationException("{0} must define a constructor that takes a ScriptContext context parameter".F(b.Name));
|
throw new InvalidOperationException("{0} must define a constructor that takes a ScriptContext context parameter".F(b.Name));
|
||||||
|
|
||||||
var binding = (ScriptGlobal)ctor.Invoke(new [] { this });
|
var binding = (ScriptGlobal)ctor.Invoke(new[] { this });
|
||||||
using (var obj = binding.ToLuaValue(this))
|
using (var obj = binding.ToLuaValue(this))
|
||||||
registerGlobal.Call(binding.Name, obj).Dispose();
|
registerGlobal.Call(binding.Name, obj).Dispose();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -162,8 +162,8 @@ namespace OpenRA.Traits
|
|||||||
};
|
};
|
||||||
|
|
||||||
foreach (var s in states)
|
foreach (var s in states)
|
||||||
if (state >= s.First && anim.HasSequence(s.Second+baseSequence))
|
if (state >= s.First && anim.HasSequence(s.Second + baseSequence))
|
||||||
return s.Second+baseSequence;
|
return s.Second + baseSequence;
|
||||||
|
|
||||||
return baseSequence;
|
return baseSequence;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ namespace OpenRA.Mods.RA.Move
|
|||||||
|
|
||||||
public void SetPosition(Actor self, CPos cell)
|
public void SetPosition(Actor self, CPos cell)
|
||||||
{
|
{
|
||||||
SetLocation(cell,fromSubCell, cell,fromSubCell);
|
SetLocation(cell, fromSubCell, cell, fromSubCell);
|
||||||
SetVisualPosition(self, fromCell.CenterPosition + MobileInfo.SubCellOffsets[fromSubCell]);
|
SetVisualPosition(self, fromCell.CenterPosition + MobileInfo.SubCellOffsets[fromSubCell]);
|
||||||
FinishedMoving(self);
|
FinishedMoving(self);
|
||||||
}
|
}
|
||||||
@@ -225,7 +225,7 @@ namespace OpenRA.Mods.RA.Move
|
|||||||
public void SetPosition(Actor self, WPos pos)
|
public void SetPosition(Actor self, WPos pos)
|
||||||
{
|
{
|
||||||
var cell = pos.ToCPos();
|
var cell = pos.ToCPos();
|
||||||
SetLocation(cell,fromSubCell, cell,fromSubCell);
|
SetLocation(cell, fromSubCell, cell, fromSubCell);
|
||||||
SetVisualPosition(self, pos);
|
SetVisualPosition(self, pos);
|
||||||
FinishedMoving(self);
|
FinishedMoving(self);
|
||||||
}
|
}
|
||||||
@@ -355,7 +355,7 @@ namespace OpenRA.Mods.RA.Move
|
|||||||
|
|
||||||
public string VoicePhraseForOrder(Actor self, Order order)
|
public string VoicePhraseForOrder(Actor self, Order order)
|
||||||
{
|
{
|
||||||
switch( order.OrderString )
|
switch (order.OrderString)
|
||||||
{
|
{
|
||||||
case "Move":
|
case "Move":
|
||||||
case "Scatter":
|
case "Scatter":
|
||||||
@@ -390,7 +390,7 @@ namespace OpenRA.Mods.RA.Move
|
|||||||
return new[]{ fromSubCell, SubCell.TopLeft, SubCell.TopRight, SubCell.Center,
|
return new[]{ fromSubCell, SubCell.TopLeft, SubCell.TopRight, SubCell.Center,
|
||||||
SubCell.BottomLeft, SubCell.BottomRight}.First(b =>
|
SubCell.BottomLeft, SubCell.BottomRight}.First(b =>
|
||||||
{
|
{
|
||||||
var blockingActors = self.World.ActorMap.GetUnitsAt(a,b).Where(c => c != ignoreActor);
|
var blockingActors = self.World.ActorMap.GetUnitsAt(a, b).Where(c => c != ignoreActor);
|
||||||
if (blockingActors.Any())
|
if (blockingActors.Any())
|
||||||
{
|
{
|
||||||
// Non-sharable unit can enter a cell with shareable units only if it can crush all of them
|
// Non-sharable unit can enter a cell with shareable units only if it can crush all of them
|
||||||
|
|||||||
Reference in New Issue
Block a user