Rewrite sequence loading logic.
Multiple layers of Lazy<T>ness are replaced with an explicit two-part loading scheme. Sequences are parsed immediately, without the need for the sprite assets, and tell the SpriteCache which frames they need. Use-cases that want the actual sprites can then tell the SpriteCache to load the frames and the sequences to resolve the sprites.
This commit is contained in:
@@ -67,7 +67,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
Console.WriteLine($"Testing default sequences for {tileset}");
|
||||
|
||||
var sequences = new SequenceProvider(modData.DefaultFileSystem, modData, tileset, null);
|
||||
var sequences = new SequenceSet(modData.DefaultFileSystem, modData, tileset, null);
|
||||
CheckSequences(modData, modData.DefaultRules, sequences);
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
}
|
||||
}
|
||||
|
||||
void CheckSequences(ModData modData, Ruleset rules, SequenceProvider sequences)
|
||||
void CheckSequences(ModData modData, Ruleset rules, SequenceSet sequences)
|
||||
{
|
||||
foreach (var customSequencesPassType in modData.ObjectCreator.GetTypesImplementing<ILintSequencesPass>())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user