project_files/HedgewarsMobile/Classes/GameSetup.m
changeset 3535 9e78c1f3d8d8
parent 3523 6592fbb969da
child 3546 ccf4854df294
equal deleted inserted replaced
3534:51521238724f 3535:9e78c1f3d8d8
   284 				// local game
   284 				// local game
   285 				[self sendToEngine:@"TL"];
   285 				[self sendToEngine:@"TL"];
   286 				
   286 				
   287 				// seed info
   287 				// seed info
   288 				[self sendToEngine:[self.gameConfig objectForKey:@"seed_command"]];
   288 				[self sendToEngine:[self.gameConfig objectForKey:@"seed_command"]];
   289 				
       
   290                 // scheme (returns initial health)
       
   291                 NSInteger health = [self provideScheme:[self.gameConfig objectForKey:@"scheme"]];
       
   292 
   289 
   293 				// dimension of the map
   290 				// dimension of the map
   294 				[self sendToEngine:[self.gameConfig objectForKey:@"templatefilter_command"]];
   291 				[self sendToEngine:[self.gameConfig objectForKey:@"templatefilter_command"]];
   295 				[self sendToEngine:[self.gameConfig objectForKey:@"mapgen_command"]];
   292 				[self sendToEngine:[self.gameConfig objectForKey:@"mapgen_command"]];
   296 				[self sendToEngine:[self.gameConfig objectForKey:@"mazesize_command"]];
   293 				[self sendToEngine:[self.gameConfig objectForKey:@"mazesize_command"]];
   297 
   294 
   298 				// theme info
   295 				// theme info
   299 				[self sendToEngine:[self.gameConfig objectForKey:@"theme_command"]];
   296 				[self sendToEngine:[self.gameConfig objectForKey:@"theme_command"]];
   300 				
   297 				
       
   298                 // scheme (returns initial health)
       
   299                 NSInteger health = [self provideScheme:[self.gameConfig objectForKey:@"scheme"]];
       
   300                 
   301                 NSArray *teamsConfig = [self.gameConfig objectForKey:@"teams_list"];
   301                 NSArray *teamsConfig = [self.gameConfig objectForKey:@"teams_list"];
   302                 for (NSDictionary *teamData in teamsConfig) {
   302                 for (NSDictionary *teamData in teamsConfig) {
   303                     [self provideTeamData:[teamData objectForKey:@"team"] 
   303                     [self provideTeamData:[teamData objectForKey:@"team"] 
   304                                   forHogs:[[teamData objectForKey:@"number"] intValue]
   304                                   forHogs:[[teamData objectForKey:@"number"] intValue]
   305                                withHealth:health
   305                                withHealth:health