Require map generators to specify valid tilesets.

This commit is contained in:
Paul Chote
2025-04-26 13:29:03 +01:00
committed by Gustas Kažukauskas
parent c41a1302b6
commit e5ffed2a4f
6 changed files with 18 additions and 2 deletions

View File

@@ -32,6 +32,10 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Internal id for this map generator.")]
public readonly string Type = null;
[FieldLoader.Require]
[Desc("Tilesets that are compatible with this map generator.")]
public readonly string[] Tilesets = null;
[FluentReference]
[Desc("The title to use for generated maps.")]
public readonly string MapTitle = "label-random-map";
@@ -115,6 +119,7 @@ namespace OpenRA.Mods.Common.Traits
string IEditorToolInfo.Label => Name;
string IEditorToolInfo.PanelWidget => PanelWidget;
string[] IEditorMapGeneratorInfo.Tilesets => Tilesets;
}
public class ClearMapGenerator { /* we're only interested in the Info */ }