Rewrite map generator settings UI logic.

This commit is contained in:
Paul Chote
2025-04-14 09:35:13 +01:00
committed by Gustas Kažukauskas
parent 8f46247dc9
commit 78f660124c
9 changed files with 390 additions and 548 deletions

View File

@@ -969,16 +969,23 @@ namespace OpenRA.Mods.Common.Traits
: base(message, inner) { }
}
public interface IMapGeneratorSettings
{
/// <summary>Returns the options that allow users to customise the result.</summary>
List<MapGeneratorOption> Options { get; }
void Randomize(MersenneTwister random);
/// <summary>Merge all choices into a complete settings MiniYaml.</summary>
MiniYaml Compile(ITerrainInfo terrainInfo);
}
public interface IMapGeneratorInfo : ITraitInfoInterface
{
string Type { get; }
string Name { get; }
/// <summary>
/// Get the generator settings available for this tileset.
/// Returns null if not compatible with the given tileset.
/// </summary>
MapGeneratorSettings GetSettings(ITerrainInfo terrainInfo);
IMapGeneratorSettings GetSettings();
/// <summary>
/// Generate or manipulate a supplied map in-place.