mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-11 20:39:29 +08:00
(RioOpener.TryOpen): use LINQ syntax.
This commit is contained in:
parent
eb9c5128a0
commit
48bb4bc59f
@ -67,13 +67,14 @@ namespace GameRes.Formats.Rugp
|
||||
reader.DeserializeRelic();
|
||||
var nodes = reader.Arc.LoadArray.OfType<COceanNode>();
|
||||
var types = nodes.Select (n => n.ClassName).Distinct();
|
||||
var dir = nodes.Where (n => SupportedClasses.ContainsKey (n.ClassName))
|
||||
.Select (n => new Entry {
|
||||
Name = n.Name,
|
||||
Type = SupportedClasses[n.ClassName],
|
||||
Offset = n.Offset,
|
||||
Size = n.Size
|
||||
});
|
||||
var dir = from node in nodes
|
||||
where SupportedClasses.ContainsKey (node.ClassName)
|
||||
select new Entry {
|
||||
Name = node.Name,
|
||||
Type = SupportedClasses[node.ClassName],
|
||||
Offset = node.Offset,
|
||||
Size = node.Size
|
||||
};
|
||||
if (!dir.Any())
|
||||
return null;
|
||||
return new ArcFile (file, this, dir.ToList());
|
||||
|
Loading…
x
Reference in New Issue
Block a user