small code optimisations as suggested
This commit is contained in:
@@ -21,10 +21,7 @@ namespace OpenRA.FileFormats
|
|||||||
|
|
||||||
static int[] GetRemapRamp(int[] Ramp)
|
static int[] GetRemapRamp(int[] Ramp)
|
||||||
{
|
{
|
||||||
int[] RemapRamp = new int[Ramp.Length];
|
var RemapRamp = Ramp.Select(r => r - Ramp[0]).ToArray();
|
||||||
for (var i=0; i < Ramp.Length; i++)
|
|
||||||
RemapRamp[i] = Ramp[i] - Ramp[0];
|
|
||||||
|
|
||||||
return RemapRamp;
|
return RemapRamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace OpenRA.Traits
|
|||||||
{
|
{
|
||||||
public readonly string BasePalette = null;
|
public readonly string BasePalette = null;
|
||||||
public readonly string BaseName = "player";
|
public readonly string BaseName = "player";
|
||||||
public readonly int[] RemapIndex = new[] {};
|
public readonly int[] RemapIndex = {};
|
||||||
|
|
||||||
public object Create( ActorInitializer init ) { return new PlayerColorPalette( init.self.Owner, this ); }
|
public object Create( ActorInitializer init ) { return new PlayerColorPalette( init.self.Owner, this ); }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,4 @@ cd "$(SolutionDir)"</PostBuildEvent>
|
|||||||
<Name>OpenRA.Mods.RA</Name>
|
<Name>OpenRA.Mods.RA</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Render\" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
Reference in New Issue
Block a user