StyleCop clean Cnc DLL
This commit is contained in:
@@ -21,8 +21,8 @@ namespace OpenRA.Mods.Cnc
|
||||
public class WithCargoInfo : ITraitInfo, Requires<CargoInfo>, Requires<IBodyOrientationInfo>
|
||||
{
|
||||
[Desc("Cargo position relative to turret or body. (forward, right, up) triples")]
|
||||
public readonly WRange[] LocalOffset = {};
|
||||
public readonly string[] DisplayTypes = {};
|
||||
public readonly WRange[] LocalOffset = { };
|
||||
public readonly string[] DisplayTypes = { };
|
||||
|
||||
public object Create(ActorInitializer init) { return new WithCargo(init.self, this); }
|
||||
}
|
||||
@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Cnc
|
||||
{
|
||||
Cargo cargo;
|
||||
IFacing facing;
|
||||
WithCargoInfo Info;
|
||||
WithCargoInfo cargoInfo;
|
||||
WVec[] positions;
|
||||
IBodyOrientation body;
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Cnc
|
||||
{
|
||||
cargo = self.Trait<Cargo>();
|
||||
facing = self.TraitOrDefault<IFacing>();
|
||||
Info = info;
|
||||
cargoInfo = info;
|
||||
|
||||
body = self.Trait<IBodyOrientation>();
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace OpenRA.Mods.Cnc
|
||||
|
||||
positions = new WVec[info.LocalOffset.Length / 3];
|
||||
for (var i = 0; i < info.LocalOffset.Length / 3; i++)
|
||||
positions[i] = new WVec(info.LocalOffset[3*i], info.LocalOffset[3*i + 1], info.LocalOffset[3*i + 2]);
|
||||
positions[i] = new WVec(info.LocalOffset[3 * i], info.LocalOffset[3 * i + 1], info.LocalOffset[3 * i + 2]);
|
||||
}
|
||||
|
||||
public IEnumerable<IRenderable> ModifyRender(Actor self, WorldRenderer wr, IEnumerable<IRenderable> r)
|
||||
@@ -66,7 +66,7 @@ namespace OpenRA.Mods.Cnc
|
||||
cargoFacing.Facing = facing.Facing;
|
||||
|
||||
var cargoPassenger = c.Trait<Passenger>();
|
||||
if (Info.DisplayTypes.Contains(cargoPassenger.info.CargoType))
|
||||
if (cargoInfo.DisplayTypes.Contains(cargoPassenger.info.CargoType))
|
||||
{
|
||||
var offset = pos - c.CenterPosition + body.LocalToWorld(positions[i++ % positions.Length].Rotate(bodyOrientation));
|
||||
foreach (var cr in c.Render(wr))
|
||||
|
||||
Reference in New Issue
Block a user