project_files/HedgewarsMobile/Classes/MissionTrainingViewController.m
branchios-revival
changeset 11243 a954853e9c00
parent 11224 32366eb83383
child 11350 1f517a461c33
equal deleted inserted replaced
11242:e529b597f9d1 11243:a954853e9c00
   133         if ([line length] > 0)
   133         if ([line length] > 0)
   134         {
   134         {
   135             NSUInteger firstDotLocation = [line rangeOfString:@"."].location;
   135             NSUInteger firstDotLocation = [line rangeOfString:@"."].location;
   136             
   136             
   137             NSString *missionID = [line substringToIndex:firstDotLocation];
   137             NSString *missionID = [line substringToIndex:firstDotLocation];
       
   138             
       
   139             NSString *missionFullPath = [NSString stringWithFormat:@"%@%@.lua", TRAININGS_DIRECTORY(), missionID];
       
   140             if (![[NSFileManager defaultManager] fileExistsAtPath:missionFullPath])
       
   141             {
       
   142                 continue;
       
   143             }
       
   144             
   138             NSString *nameOrDesc = [line substringFromIndex:firstDotLocation+1];
   145             NSString *nameOrDesc = [line substringFromIndex:firstDotLocation+1];
   139             
   146             
   140             NSString *missionParsedName = ([nameOrDesc hasPrefix:@"name="]) ? [nameOrDesc stringByReplacingOccurrencesOfString:@"name=" withString:@""] : nil;
   147             NSString *missionParsedName = ([nameOrDesc hasPrefix:@"name="]) ? [nameOrDesc stringByReplacingOccurrencesOfString:@"name=" withString:@""] : nil;
   141             NSString *missionParsedDesc = ([nameOrDesc hasPrefix:@"desc="]) ? [nameOrDesc stringByReplacingOccurrencesOfString:@"desc=" withString:@""] : nil;
   148             NSString *missionParsedDesc = ([nameOrDesc hasPrefix:@"desc="]) ? [nameOrDesc stringByReplacingOccurrencesOfString:@"desc=" withString:@""] : nil;
   142             
   149