Move Util to Mods.Common.
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user