project_files/HedgewarsMobile/Classes/WeaponSettingsViewController.m
changeset 6103 55ecfbf834e3
parent 6074 047eaed35cbb
child 6700 e04da46ee43c
equal deleted inserted replaced
6102:97565ab4afe9 6103:55ecfbf834e3
    78 }
    78 }
    79 
    79 
    80 -(void) addWeapon:(id) sender {
    80 -(void) addWeapon:(id) sender {
    81     NSString *fileName = [[NSString alloc] initWithFormat:@"Weapon %u.plist", [self.listOfWeapons count]];
    81     NSString *fileName = [[NSString alloc] initWithFormat:@"Weapon %u.plist", [self.listOfWeapons count]];
    82 
    82 
    83     createWeaponNamed([fileName stringByDeletingPathExtension], 0);
    83     [CreationChamber createWeaponNamed:[fileName stringByDeletingPathExtension]];
    84 
    84 
    85     [self.listOfWeapons addObject:fileName];
    85     [self.listOfWeapons addObject:fileName];
    86 
    86 
    87     // order the array alphabetically, so schemes will keep their position
    87     // order the array alphabetically, so schemes will keep their position
    88     [self.listOfWeapons sortUsingSelector:@selector(compare:)];
    88     [self.listOfWeapons sortUsingSelector:@selector(compare:)];