project_files/HedgewarsMobile/Classes/GameConfigViewController.m
changeset 5455 df05cdb998ed
parent 5208 878e551f0b4a
child 5666 cc79eb30346e
equal deleted inserted replaced
5453:ea6f7631df4a 5455:df05cdb998ed
   210     button.enabled = YES;
   210     button.enabled = YES;
   211     
   211     
   212     if ([self isEverythingSet] == NO)
   212     if ([self isEverythingSet] == NO)
   213         return;
   213         return;
   214 
   214 
       
   215     NSString *script = self.mapConfigViewController.missionCommand;
       
   216     if ([script isEqualToString:@""])
       
   217         script = self.schemeWeaponConfigViewController.scriptCommand;
       
   218 
   215     // create the configuration file that is going to be sent to engine
   219     // create the configuration file that is going to be sent to engine
   216     NSDictionary *gameDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
   220     NSDictionary *gameDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
   217                                     self.mapConfigViewController.seedCommand,@"seed_command",
   221                                     self.mapConfigViewController.seedCommand,@"seed_command",
   218                                     self.mapConfigViewController.templateFilterCommand,@"templatefilter_command",
   222                                     self.mapConfigViewController.templateFilterCommand,@"templatefilter_command",
   219                                     self.mapConfigViewController.mapGenCommand,@"mapgen_command",
   223                                     self.mapConfigViewController.mapGenCommand,@"mapgen_command",
   220                                     self.mapConfigViewController.mazeSizeCommand,@"mazesize_command",
   224                                     self.mapConfigViewController.mazeSizeCommand,@"mazesize_command",
   221                                     self.mapConfigViewController.themeCommand,@"theme_command",
   225                                     self.mapConfigViewController.themeCommand,@"theme_command",
   222                                     self.mapConfigViewController.staticMapCommand,@"staticmap_command",
   226                                     self.mapConfigViewController.staticMapCommand,@"staticmap_command",
   223                                     self.mapConfigViewController.missionCommand,@"mission_command",
       
   224                                     self.teamConfigViewController.listOfSelectedTeams,@"teams_list",
   227                                     self.teamConfigViewController.listOfSelectedTeams,@"teams_list",
   225                                     self.schemeWeaponConfigViewController.selectedScheme,@"scheme",
   228                                     self.schemeWeaponConfigViewController.selectedScheme,@"scheme",
   226                                     self.schemeWeaponConfigViewController.selectedWeapon,@"weapon",
   229                                     self.schemeWeaponConfigViewController.selectedWeapon,@"weapon",
       
   230                                     script,@"mission_command",
   227                                     nil];
   231                                     nil];
   228 
   232 
   229     GameInterfaceBridge *bridge = [[GameInterfaceBridge alloc] initWithController:self];
   233     GameInterfaceBridge *bridge = [[GameInterfaceBridge alloc] initWithController:self];
   230 
   234 
   231     [bridge startLocalGame:gameDictionary];
   235     [bridge startLocalGame:gameDictionary];