project_files/HedgewarsMobile/Classes/CreationChamber.m
author koda
Sat, 05 Feb 2011 15:45:44 +0100
changeset 4920 bc3c077e15a2
parent 4607 7f683c2357a0
child 4945 541d35d1f2e8
permissions -rw-r--r--
cleaning up how chat is handled on idevices updated project to use updated libs some leaks resolved (maybe)
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) {
4607
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
    77
        default: //default
4281
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
    78
            theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
4607
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
    79
                         @"939192942219912103223511100120100000021111010101112",@"ammostore_initialqt",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
    80
                         @"040504054160065554655446477657666666615551010111541",@"ammostore_probability",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
    81
                         @"000000000000020550000004000700400000000020000000060",@"ammostore_delay",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
    82
                         @"131111031211111112311411111111111111121111110111112",@"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:
4607
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
    86
                         @"999999999999999999299999999999999929999999990999999",@"ammostore_initialqt",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
    87
                         @"111111011111111111111111111111111111111111110111111",@"ammostore_probability",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
    88
                         @"000000000000000000000000000000000000000000000000000",@"ammostore_delay",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
    89
                         @"131111031211111112311411111111111111121111010111111",@"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:
4607
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
    93
                         @"909000900000000000000900000000000000000000000000000",@"ammostore_initialqt",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
    94
                         @"000000000000000000000000000000000000000000000000000",@"ammostore_probability",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
    95
                         @"000000000000020550000004000700400000000020000000000",@"ammostore_delay",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
    96
                         @"111111111111111111111111111111111111111110010111111",@"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:
4607
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   100
                         @"000000990000000000000000000000000000000000000000000",@"ammostore_initialqt",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   101
                         @"444441004424440221011212122242200000000200040001001",@"ammostore_probability",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   102
                         @"000000000000000000000000000000000000000000000000000",@"ammostore_delay",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   103
                         @"111111111111111111111111111111111111111110110111111",@"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:
4607
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   107
                         @"101000900001000001100000000000000000000000000000100",@"ammostore_initialqt",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   108
                         @"040504054160065554655446477657666666615551010111541",@"ammostore_probability",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   109
                         @"000000000000020550000004000700400000000020000000000",@"ammostore_delay",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   110
                         @"131111031211111112311411111111111111121111110111111",@"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:
4607
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   114
                         @"000000990009000000030000000000000000000000000000000",@"ammostore_initialqt",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   115
                         @"000000000000000000000000000000000000000000000000000",@"ammostore_probability",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   116
                         @"000000000000020550000004000700400000000020000000000",@"ammostore_delay",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   117
                         @"111111111111111111111111111111111111111111110111111",@"ammostore_crate", nil];
4284
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:
4607
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   121
                         @"900000900200000000210000000000000011000009000000000",@"ammostore_initialqt",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   122
                         @"040504054160065554655446477657666666615551010111541",@"ammostore_probability",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   123
                         @"000000000000020550000004000700400000000020000000060",@"ammostore_delay",
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   124
                         @"131111031211111112311411111111111111121111110111111",@"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
    }
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   127
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   128
    NSString *weaponFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", weaponsDirectory, nameWithoutExt];
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
    [theWeapon writeToFile:weaponFile atomically:YES];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   131
    [weaponFile release];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   132
    [theWeapon release];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   133
}
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   134
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   135
void createSchemeNamed (NSString *nameWithoutExt) {
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   136
    NSString *schemesDirectory = SCHEMES_DIRECTORY();
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
    if (![[NSFileManager defaultManager] fileExistsAtPath: schemesDirectory]) {
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   139
        [[NSFileManager defaultManager] createDirectoryAtPath:schemesDirectory
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   140
                                  withIntermediateDirectories:NO
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   141
                                                   attributes:nil
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   142
                                                        error:NULL];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   143
    }
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   144
4607
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   145
    int basicFlags[] = {100, 100, 45, 15, 47, 5, 100, 5, 35, 25, 3, 4, 0, 2};
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   146
    BOOL gameFlags[] = {NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, YES, NO, NO, NO, NO,
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   147
        NO, NO, NO, NO, NO, NO, NO};
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   148
4281
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   149
    NSMutableArray *basicArray  = [[NSMutableArray alloc] initWithObjects:
4607
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   150
                                   [NSNumber numberWithInt:basicFlags[0]],          //initialhealth
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   151
                                   [NSNumber numberWithInt:basicFlags[1]],          //damagemodifier
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   152
                                   [NSNumber numberWithInt:basicFlags[2]],          //turntime
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   153
                                   [NSNumber numberWithInt:basicFlags[3]],          //suddendeathtimeout
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   154
                                   [NSNumber numberWithInt:basicFlags[4]],          //waterrise
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   155
                                   [NSNumber numberWithInt:basicFlags[5]],          //healthdecrease
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   156
                                   [NSNumber numberWithInt:basicFlags[6]],          //ropelength
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   157
                                   [NSNumber numberWithInt:basicFlags[7]],          //cratedrops
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   158
                                   [NSNumber numberWithInt:basicFlags[8]],          //healthprob
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   159
                                   [NSNumber numberWithInt:basicFlags[9]],          //healthamount
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   160
                                   [NSNumber numberWithInt:basicFlags[10]],         //minestime
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   161
                                   [NSNumber numberWithInt:basicFlags[11]],         //minesnumber
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   162
                                   [NSNumber numberWithInt:basicFlags[12]],         //dudmines
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   163
                                   [NSNumber numberWithInt:basicFlags[13]],         //explosives
4281
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   164
                                   nil];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   165
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   166
    NSMutableArray *gamemodArray= [[NSMutableArray alloc] initWithObjects:
4607
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   167
                                   [NSNumber numberWithBool:gameFlags[0]],          //fortmode
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   168
                                   [NSNumber numberWithBool:gameFlags[1]],          //divideteam
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   169
                                   [NSNumber numberWithBool:gameFlags[2]],          //solidland
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   170
                                   [NSNumber numberWithBool:gameFlags[3]],          //addborder
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   171
                                   [NSNumber numberWithBool:gameFlags[4]],          //lowgravity
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   172
                                   [NSNumber numberWithBool:gameFlags[5]],          //lasersight
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   173
                                   [NSNumber numberWithBool:gameFlags[6]],          //invulnerable
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   174
                                   [NSNumber numberWithBool:gameFlags[7]],          //resethealth
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   175
                                   [NSNumber numberWithBool:gameFlags[8]],          //vampirism
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   176
                                   [NSNumber numberWithBool:gameFlags[9]],          //karma
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   177
                                   [NSNumber numberWithBool:gameFlags[10]],         //artillery
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   178
                                   [NSNumber numberWithBool:gameFlags[11]],         //randomorder
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   179
                                   [NSNumber numberWithBool:gameFlags[12]],         //king
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   180
                                   [NSNumber numberWithBool:gameFlags[13]],         //placehedgehogs
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   181
                                   [NSNumber numberWithBool:gameFlags[14]],         //clansharesammo
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   182
                                   [NSNumber numberWithBool:gameFlags[15]],         //disablegirders
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   183
                                   [NSNumber numberWithBool:gameFlags[16]],         //disablelandobjects
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   184
                                   [NSNumber numberWithBool:gameFlags[17]],         //aisurvival
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   185
                                   [NSNumber numberWithBool:gameFlags[18]],         //infattack
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   186
                                   [NSNumber numberWithBool:gameFlags[19]],         //resetweaps
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   187
                                   [NSNumber numberWithBool:gameFlags[20]],         //perhogammo
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   188
                                   [NSNumber numberWithBool:gameFlags[21]],         //nowind
7f683c2357a0 update weapons
koda
parents: 4605
diff changeset
   189
                                   [NSNumber numberWithBool:gameFlags[22]],         //morewind
4281
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   190
                                   nil];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   191
    
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   192
    NSMutableDictionary *theScheme = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   193
                                      basicArray,@"basic",
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   194
                                      gamemodArray,@"gamemod",
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   195
                                      nil];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   196
    [gamemodArray release];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   197
    [basicArray release];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   198
    
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   199
    NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", schemesDirectory, nameWithoutExt];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   200
    
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   201
    [theScheme writeToFile:schemeFile atomically:YES];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   202
    [schemeFile release];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   203
    [theScheme release];
e033cf015b2c redo once again file updating, moving stuff around
koda
parents:
diff changeset
   204
}