Deserialize mod rules only once when loading all maps.

This avoids loading, parsing and merging YAML rules for the mod during loading of each individual map. This saves significant time resolving custom rules on each map loaded.
This commit is contained in:
RoosterDragon
2023-05-09 19:36:58 +01:00
committed by abcdefg30
parent de22556153
commit 300281695a
3 changed files with 25 additions and 10 deletions

View File

@@ -166,6 +166,11 @@ namespace OpenRA
return map;
}
public List<MiniYamlNode>[] GetRulesYaml()
{
return Manifest.Rules.Select(s => MiniYaml.FromStream(DefaultFileSystem.Open(s), s)).ToArray();
}
public void Dispose()
{
LoadScreen?.Dispose();