equal
deleted
inserted
replaced
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 |