diff --git a/OpenRA.Editor/Form1.cs b/OpenRA.Editor/Form1.cs index dea04c0e80..b5e58ad577 100755 --- a/OpenRA.Editor/Form1.cs +++ b/OpenRA.Editor/Form1.cs @@ -155,6 +155,13 @@ namespace OpenRA.Editor { var info = Rules.Info[a]; if (!info.Traits.Contains()) continue; + + var etf = info.Traits.GetOrDefault(); + if (etf != null && etf.ExcludeTilesets != null + && etf.ExcludeTilesets.Contains(tileset.Id)) continue; + if (etf != null && etf.RequireTilesets != null + && !etf.RequireTilesets.Contains(tileset.Id)) continue; + var template = RenderUtils.RenderActor(info, tileset, palette); var ibox = new PictureBox { diff --git a/OpenRA.Game/OpenRA.Game.csproj b/OpenRA.Game/OpenRA.Game.csproj index 8ce96ce671..58323d8270 100755 --- a/OpenRA.Game/OpenRA.Game.csproj +++ b/OpenRA.Game/OpenRA.Game.csproj @@ -184,6 +184,7 @@ + diff --git a/OpenRA.Game/Traits/EditorTilesetFilter.cs b/OpenRA.Game/Traits/EditorTilesetFilter.cs new file mode 100644 index 0000000000..ad91c9904f --- /dev/null +++ b/OpenRA.Game/Traits/EditorTilesetFilter.cs @@ -0,0 +1,20 @@ +#region Copyright & License Information +/* + * Copyright 2007-2011 The OpenRA Developers (see AUTHORS) + * This file is part of OpenRA, which is free software. It is made + * available to you under the terms of the GNU General Public License + * as published by the Free Software Foundation. For more information, + * see COPYING. + */ +#endregion + +namespace OpenRA.Traits +{ + public class EditorTilesetFilterInfo : TraitInfo + { + public readonly string[] RequireTilesets = null; + public readonly string[] ExcludeTilesets = null; + } + + public class EditorTilesetFilter { } +}