Require map generators to specify valid tilesets.
This commit is contained in:
committed by
Gustas Kažukauskas
parent
c41a1302b6
commit
e5ffed2a4f
@@ -29,6 +29,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
var tools = world.Map.Rules.Actors[SystemActors.EditorWorld].TraitInfos<IEditorToolInfo>();
|
||||
foreach (var tool in tools)
|
||||
{
|
||||
if (tool is IEditorMapGeneratorInfo gi && !gi.Tilesets.Contains(world.Map.Tileset))
|
||||
continue;
|
||||
|
||||
var panel = Game.LoadWidget(world, tool.PanelWidget, widget, new WidgetArgs() { { "tool", tool } });
|
||||
toolPanels.Add(panel);
|
||||
toolLabels.Add(panel, FluentProvider.GetMessage(tool.Label));
|
||||
|
||||
Reference in New Issue
Block a user