Exemplo n.º 1
0
        public (string Path, SkinIdentifier Identifier)? FindMREC(string filePath, SkinIdentifier sourceIdentifier)
        {
            var reader = new AssetReader(filePath, null, null);
            var mrec   = reader.GetHeaderIndexList()
                         .FirstOrDefault(hi => hi.Contains($"{sourceIdentifier.Aircraft}_") && hi.Contains("MREC") && hi.Contains("/Game/"));
            var parsed = _parserService.ParseMatch($"{mrec}.uasset"); //TODO: oh boy what a f****n hack

            if (parsed is SkinIdentifier {
                Type : "MREC"
            } skinIdentifier)
            {
                return(mrec, skinIdentifier);
            }
            return(null);
        }
Exemplo n.º 2
0
        public (string Path, SkinIdentifier Identifier)? FindNormal(string filePath, SkinIdentifier sourceIdentifier)
        {
            var reader = new AssetReader(filePath, null, null);
            var normal = reader.GetHeaderIndexList()
                         .FirstOrDefault(hi => hi.Contains($"{sourceIdentifier.Aircraft}_{sourceIdentifier.Slot}") && hi.Contains("_N.") && hi.Contains("/Game/"));
            var parsed = _parserService.ParseMatch(normal);

            if (parsed is SkinIdentifier {
                Type : "N"
            } skinIdentifier)
            {
                return(normal, skinIdentifier);
            }
            return(null);
        }