Add MapClassification.Generated.

Generated maps are created at runtime using a
mod-defined trait. They are embedded directly
into replays and save games as they exist in
memory only, and disappear after the game exits.
This commit is contained in:
Paul Chote
2025-04-17 18:54:38 +01:00
committed by Gustas Kažukauskas
parent 6be947bbf0
commit 979483b63c
15 changed files with 226 additions and 6 deletions

View File

@@ -239,6 +239,10 @@ namespace OpenRA
MapTitle = Map.Title
};
var preview = modData.MapCache[Map.Uid];
if (preview.Class == MapClassification.Generated)
gameInfo.MapData = preview.ToBase64String();
RulesContainTemporaryBlocker = Map.Rules.Actors.Any(a => a.Value.HasTraitInfo<ITemporaryBlockerInfo>());
gameSettings = Game.Settings.Game;
}