project_files/HedgewarsMobile/Classes/CreationChamber.m
author koda
Thu, 16 Dec 2010 22:46:38 +0100
changeset 4547 b70004a576a3
parent 4488 e83216eba1db
child 4605 a5c2f09daaaa
permissions -rw-r--r--
move server connection stuff in its own class
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4281
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
     1
/*
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
     2
 * Hedgewars-iOS, a Hedgewars port for iOS devices
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
     3
 * Copyright (c) 2009-2010 Vittorio Giovara <vittorio.giovara@gmail.com>
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
     4
 *
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
     8
 *
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    12
 * GNU General Public License for more details.
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    13
 *
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    17
 *
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    18
 * File created on 12/11/2010.
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    19
 */
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    20
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    21
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    22
#import "CreationChamber.h"
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    23
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    24
void createTeamNamed (NSString *nameWithoutExt) {
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    25
    NSString *teamsDirectory = TEAMS_DIRECTORY();
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    26
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    27
    if (![[NSFileManager defaultManager] fileExistsAtPath: teamsDirectory]) {
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    28
        [[NSFileManager defaultManager] createDirectoryAtPath:teamsDirectory
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    29
                                  withIntermediateDirectories:NO
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    30
                                                   attributes:nil
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    31
                                                        error:NULL];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    32
    }
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    33
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    34
    NSMutableArray *hedgehogs = [[NSMutableArray alloc] initWithCapacity: HW_getMaxNumberOfHogs()];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    35
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    36
    for (int i = 0; i < HW_getMaxNumberOfHogs(); i++) {
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    37
        NSString *hogName = [[NSString alloc] initWithFormat:@"hedgehog %d",i];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    38
        NSDictionary *hog = [[NSDictionary alloc] initWithObjectsAndKeys:
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    39
                             [NSNumber numberWithInt:0],@"level",
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    40
                             hogName,@"hogname",
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    41
                             @"NoHat",@"hat",
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    42
                             nil];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    43
        [hogName release];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    44
        [hedgehogs addObject:hog];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    45
        [hog release];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    46
    }
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    47
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    48
    NSDictionary *theTeam = [[NSDictionary alloc] initWithObjectsAndKeys:
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    49
                             @"0",@"hash",
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    50
                             @"Statue",@"grave",
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    51
                             @"Plane",@"fort",
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    52
                             @"Default",@"voicepack",
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    53
                             @"hedgewars",@"flag",
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    54
                             hedgehogs,@"hedgehogs",
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    55
                             nil];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    56
    [hedgehogs release];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    57
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    58
    NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", teamsDirectory, nameWithoutExt];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    59
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    60
    [theTeam writeToFile:teamFile atomically:YES];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    61
    [teamFile release];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    62
    [theTeam release];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    63
}
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    64
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    65
void createWeaponNamed (NSString *nameWithoutExt, int type) {
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    66
    NSString *weaponsDirectory = WEAPONS_DIRECTORY();
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    67
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    68
    if (![[NSFileManager defaultManager] fileExistsAtPath: weaponsDirectory]) {
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    69
        [[NSFileManager defaultManager] createDirectoryAtPath:weaponsDirectory
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    70
                                  withIntermediateDirectories:NO
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    71
                                                   attributes:nil
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    72
                                                        error:NULL];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    73
    }
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    74
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    75
    NSDictionary *theWeapon = nil;
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    76
    switch (type) {
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    77
        case 0: //default
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    78
            theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
4284
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
    79
                         @"93919294221991210322351110012010000002111101010111",@"ammostore_initialqt",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
    80
                         @"04050405416006555465544647765766666661555101011154",@"ammostore_probability",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
    81
                         @"00000000000002055000000400070040000000002000000006",@"ammostore_delay",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
    82
                         @"13111103121111111231141111111111111112111111011111",@"ammostore_crate", nil];
4281
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    83
            break;
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    84
        case 1: //crazy
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    85
            theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
4284
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
    86
                         @"99999999999999999929999999999999992999999999099999",@"ammostore_initialqt",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
    87
                         @"11111101111111111111111111111111111111111111011111",@"ammostore_probability",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
    88
                         @"00000000000000000000000000000000000000000000000000",@"ammostore_delay",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
    89
                         @"13111103121111111231141111111111111112111101011111",@"ammostore_crate", nil];
4281
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    90
            break;
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    91
        case 2: //pro mode
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    92
            theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
4284
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
    93
                         @"90900090000000000000090000000000000000000000000000",@"ammostore_initialqt",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
    94
                         @"00000000000000000000000000000000000000000000000000",@"ammostore_probability",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
    95
                         @"00000000000002055000000400070040000000002000000000",@"ammostore_delay",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
    96
                         @"11111111111111111111111111111111111111111001011111",@"ammostore_crate", nil];
4281
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    97
            break;
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    98
        case 3: //shoppa
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    99
            theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
4284
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   100
                         @"00000099000000000000000000000000000000000000000000",@"ammostore_initialqt",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   101
                         @"44444100442444022101121212224220000000020004000100",@"ammostore_probability",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   102
                         @"00000000000000000000000000000000000000000000000000",@"ammostore_delay",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   103
                         @"11111111111111111111111111111111111111111011011111",@"ammostore_crate", nil];
4281
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   104
            break;
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   105
        case 4: //clean slate
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   106
            theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
4284
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   107
                         @"10100090000100000110000000000000000000000000000010",@"ammostore_initialqt",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   108
                         @"04050405416006555465544647765766666661555101011154",@"ammostore_probability",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   109
                         @"00000000000002055000000400070040000000002000000000",@"ammostore_delay",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   110
                         @"13111103121111111231141111111111111112111111011111",@"ammostore_crate", nil];
4281
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   111
            break;
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   112
        case 5: //minefield
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   113
            theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
4284
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   114
                         @"00000099000900000003000000000000000000000000000000",@"ammostore_initialqt",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   115
                         @"00000000000000000000000000000000000000000000000000",@"ammostore_probability",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   116
                         @"00000000000002055000000400070040000000002000000000",@"ammostore_delay",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   117
                         @"11111111111111111111111111111111111111111111011111",@"ammostore_crate", nil];
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   118
            break;
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   119
        case 6: //thinking with portals
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   120
            theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   121
                         @"90000090020000000021000000000000001100000900000000",@"ammostore_initialqt",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   122
                         @"04050405416006555465544647765766666661555101011154",@"ammostore_probability",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   123
                         @"00000000000002055000000400070040000000002000000006",@"ammostore_delay",
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   124
                         @"13111103121111111231141111111111111112111111011111",@"ammostore_crate", nil];
4281
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   125
            break;
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   126
        default:
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   127
            NSLog(@"Nope");
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   128
            break;
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   129
    }
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   130
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   131
    NSString *weaponFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", weaponsDirectory, nameWithoutExt];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   132
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   133
    [theWeapon writeToFile:weaponFile atomically:YES];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   134
    [weaponFile release];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   135
    [theWeapon release];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   136
}
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   137
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   138
void createSchemeNamed (NSString *nameWithoutExt) {
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   139
    NSString *schemesDirectory = SCHEMES_DIRECTORY();
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   140
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   141
    if (![[NSFileManager defaultManager] fileExistsAtPath: schemesDirectory]) {
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   142
        [[NSFileManager defaultManager] createDirectoryAtPath:schemesDirectory
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   143
                                  withIntermediateDirectories:NO
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   144
                                                   attributes:nil
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   145
                                                        error:NULL];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   146
    }
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   147
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   148
    NSMutableArray *basicArray  = [[NSMutableArray alloc] initWithObjects:
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   149
                                   [NSNumber numberWithInt:100],      //initialhealth
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   150
                                   [NSNumber numberWithInt:45],       //turntime
4488
e83216eba1db forgot to update these files
koda
parents: 4463
diff changeset
   151
                                   [NSNumber numberWithInt:3],        //minestime
4281
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   152
                                   [NSNumber numberWithInt:100],      //damagemodifier
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   153
                                   [NSNumber numberWithInt:15],       //suddendeathtimeout
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   154
                                   [NSNumber numberWithInt:47],       //waterrise
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   155
                                   [NSNumber numberWithInt:5],        //healthdecrease
4463
1fe77f2bc1d1 update schemes for ios
koda
parents: 4284
diff changeset
   156
                                   [NSNumber numberWithInt:100],      //ropelength
4281
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   157
                                   [NSNumber numberWithInt:5],        //cratedrops
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   158
                                   [NSNumber numberWithInt:35],       //healthprob
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   159
                                   [NSNumber numberWithInt:25],       //healthamount
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   160
                                   [NSNumber numberWithInt:4],        //minesnumber
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   161
                                   [NSNumber numberWithInt:0],        //dudmines
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   162
                                   [NSNumber numberWithInt:2],        //explosives
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   163
                                   nil];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   164
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   165
    NSMutableArray *gamemodArray= [[NSMutableArray alloc] initWithObjects:
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   166
                                   [NSNumber numberWithBool:NO],      //fortmode
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   167
                                   [NSNumber numberWithBool:NO],      //divideteam
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   168
                                   [NSNumber numberWithBool:NO],      //solidland
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   169
                                   [NSNumber numberWithBool:NO],      //addborder
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   170
                                   [NSNumber numberWithBool:NO],      //lowgravity
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   171
                                   [NSNumber numberWithBool:NO],      //lasersight
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   172
                                   [NSNumber numberWithBool:NO],      //invulnerable
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   173
                                   [NSNumber numberWithBool:NO],      //resethealth
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   174
                                   [NSNumber numberWithBool:NO],      //vampirism
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   175
                                   [NSNumber numberWithBool:NO],      //karma
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   176
                                   [NSNumber numberWithBool:NO],      //artillery
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   177
                                   [NSNumber numberWithBool:YES],     //randomorder
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   178
                                   [NSNumber numberWithBool:NO],      //king
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   179
                                   [NSNumber numberWithBool:NO],      //placehedgehogs
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   180
                                   [NSNumber numberWithBool:NO],      //clansharesammo
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   181
                                   [NSNumber numberWithBool:NO],      //disablegirders
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   182
                                   [NSNumber numberWithBool:NO],      //disablelandobjects
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   183
                                   [NSNumber numberWithBool:NO],      //aisurvival
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   184
                                   [NSNumber numberWithBool:NO],      //infattack
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   185
                                   [NSNumber numberWithBool:NO],      //resetweaps
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   186
                                   [NSNumber numberWithBool:NO],      //perhogammo
4284
57a501a69e5f update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents: 4281
diff changeset
   187
                                   [NSNumber numberWithBool:NO],      //nowind
4463
1fe77f2bc1d1 update schemes for ios
koda
parents: 4284
diff changeset
   188
                                   [NSNumber numberWithBool:NO],      //morewind
4281
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   189
                                   nil];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   190
    
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   191
    NSMutableDictionary *theScheme = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   192
                                      basicArray,@"basic",
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   193
                                      gamemodArray,@"gamemod",
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   194
                                      nil];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   195
    [gamemodArray release];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   196
    [basicArray release];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   197
    
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   198
    NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", schemesDirectory, nameWithoutExt];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   199
    
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   200
    [theScheme writeToFile:schemeFile atomically:YES];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   201
    [schemeFile release];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   202
    [theScheme release];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   203
}