Include all the relevant palettes in the asset browser.
This commit is contained in:
@@ -65,8 +65,8 @@
|
||||
<Compile Include="Traits\Render\WithVoxelWalkerBody.cs" />
|
||||
<Compile Include="Traits\Render\WithVoxelUnloadBody.cs" />
|
||||
<Compile Include="Traits\World\VoxelNormalsPalette.cs" />
|
||||
<Compile Include="Traits\World\ShroudPalette.cs" />
|
||||
<Compile Include="UtilityCommands\LegacyTilesetImporter.cs" />
|
||||
<Compile Include="Traits\World\TSShroudPalette.cs" />
|
||||
</ItemGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
@@ -9,8 +9,10 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.TS.Traits
|
||||
@@ -24,7 +26,7 @@ namespace OpenRA.Mods.TS.Traits
|
||||
public object Create(ActorInitializer init) { return new TSShroudPalette(this); }
|
||||
}
|
||||
|
||||
class TSShroudPalette : ILoadsPalettes
|
||||
class TSShroudPalette : ILoadsPalettes, IProvidesAssetBrowserPalettes
|
||||
{
|
||||
readonly TSShroudPaletteInfo info;
|
||||
|
||||
@@ -41,5 +43,7 @@ namespace OpenRA.Mods.TS.Traits
|
||||
|
||||
wr.AddPalette(info.Name, new ImmutablePalette(Enumerable.Range(0, Palette.Size).Select(i => makeColor(i))));
|
||||
}
|
||||
|
||||
public IEnumerable<string> PaletteNames { get { yield return info.Name; } }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user