Move Util to Mods.Common.

This commit is contained in:
Paul Chote
2016-01-16 23:38:53 +00:00
parent 0039a2bdbf
commit b0bd252343
13 changed files with 27 additions and 26 deletions

View File

@@ -159,7 +159,7 @@ namespace OpenRA.Mods.Common.Traits
var sequence = a.Info.MuzzleSequence;
if (a.Info.MuzzleSplitFacings > 0)
sequence += OpenRA.Traits.Util.QuantizeFacing(muzzleFacing, a.Info.MuzzleSplitFacings).ToString();
sequence += Util.QuantizeFacing(muzzleFacing, a.Info.MuzzleSplitFacings).ToString();
var muzzleFlash = new AnimationWithOffset(muzzleAnim,
() => PortOffset(self, port),

View File

@@ -84,7 +84,7 @@ namespace OpenRA.Mods.Common.Traits
return;
if (a.Info.MuzzleSplitFacings > 0)
sequence += OpenRA.Traits.Util.QuantizeFacing(getFacing(), a.Info.MuzzleSplitFacings).ToString();
sequence += Util.QuantizeFacing(getFacing(), a.Info.MuzzleSplitFacings).ToString();
if (barrel == null)
return;

View File

@@ -190,14 +190,14 @@ namespace OpenRA.Mods.Common.Traits
void UpdateNeighbours(IReadOnlyDictionary<CPos, SubCell> footprint)
{
// Include actors inside the footprint too
var cells = OpenRA.Traits.Util.ExpandFootprint(footprint.Keys, true);
var cells = Util.ExpandFootprint(footprint.Keys, true);
foreach (var p in cells.SelectMany(c => PreviewsAt(c)))
p.ReplaceInit(new RuntimeNeighbourInit(NeighbouringPreviews(p.Footprint)));
}
Dictionary<CPos, string[]> NeighbouringPreviews(IReadOnlyDictionary<CPos, SubCell> footprint)
{
var cells = OpenRA.Traits.Util.ExpandFootprint(footprint.Keys, true).Except(footprint.Keys);
var cells = Util.ExpandFootprint(footprint.Keys, true).Except(footprint.Keys);
return cells.ToDictionary(c => c, c => PreviewsAt(c).Select(p => p.Info.Name).ToArray());
}