author | koda |
Mon, 18 Apr 2011 02:45:51 +0200 | |
changeset 5156 | 641abe679bf0 |
parent 4976 | 088d40d8aba2 |
child 5181 | 102fef5ca5fc |
permissions | -rw-r--r-- |
4281 | 1 |
/* |
2 |
* Hedgewars-iOS, a Hedgewars port for iOS devices |
|
4976 | 3 |
* Copyright (c) 2009-2011 Vittorio Giovara <vittorio.giovara@gmail.com> |
4281 | 4 |
* |
5 |
* This program is free software; you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation; version 2 of the License |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
17 |
* |
|
18 |
* File created on 12/11/2010. |
|
19 |
*/ |
|
20 |
||
21 |
||
22 |
#import "CreationChamber.h" |
|
23 |
||
24 |
void createTeamNamed (NSString *nameWithoutExt) { |
|
25 |
NSString *teamsDirectory = TEAMS_DIRECTORY(); |
|
26 |
||
27 |
if (![[NSFileManager defaultManager] fileExistsAtPath: teamsDirectory]) { |
|
28 |
[[NSFileManager defaultManager] createDirectoryAtPath:teamsDirectory |
|
29 |
withIntermediateDirectories:NO |
|
30 |
attributes:nil |
|
31 |
error:NULL]; |
|
32 |
} |
|
33 |
||
34 |
NSMutableArray *hedgehogs = [[NSMutableArray alloc] initWithCapacity: HW_getMaxNumberOfHogs()]; |
|
35 |
||
36 |
for (int i = 0; i < HW_getMaxNumberOfHogs(); i++) { |
|
37 |
NSString *hogName = [[NSString alloc] initWithFormat:@"hedgehog %d",i]; |
|
38 |
NSDictionary *hog = [[NSDictionary alloc] initWithObjectsAndKeys: |
|
39 |
[NSNumber numberWithInt:0],@"level", |
|
40 |
hogName,@"hogname", |
|
41 |
@"NoHat",@"hat", |
|
42 |
nil]; |
|
43 |
[hogName release]; |
|
44 |
[hedgehogs addObject:hog]; |
|
45 |
[hog release]; |
|
46 |
} |
|
47 |
||
48 |
NSDictionary *theTeam = [[NSDictionary alloc] initWithObjectsAndKeys: |
|
49 |
@"0",@"hash", |
|
50 |
@"Statue",@"grave", |
|
51 |
@"Plane",@"fort", |
|
52 |
@"Default",@"voicepack", |
|
53 |
@"hedgewars",@"flag", |
|
54 |
hedgehogs,@"hedgehogs", |
|
55 |
nil]; |
|
56 |
[hedgehogs release]; |
|
57 |
||
58 |
NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", teamsDirectory, nameWithoutExt]; |
|
59 |
||
60 |
[theTeam writeToFile:teamFile atomically:YES]; |
|
61 |
[teamFile release]; |
|
62 |
[theTeam release]; |
|
63 |
} |
|
64 |
||
65 |
void createWeaponNamed (NSString *nameWithoutExt, int type) { |
|
66 |
NSString *weaponsDirectory = WEAPONS_DIRECTORY(); |
|
67 |
||
68 |
if (![[NSFileManager defaultManager] fileExistsAtPath: weaponsDirectory]) { |
|
69 |
[[NSFileManager defaultManager] createDirectoryAtPath:weaponsDirectory |
|
70 |
withIntermediateDirectories:NO |
|
71 |
attributes:nil |
|
72 |
error:NULL]; |
|
73 |
} |
|
74 |
||
75 |
NSDictionary *theWeapon = nil; |
|
76 |
switch (type) { |
|
4607 | 77 |
default: //default |
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
78 |
theWeapon = [[NSDictionary alloc] initWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
79 |
[NSArray arrayWithObjects: |
4950
941f17b2dd9f
disable the two last workinprogress weapons on the ios release
koda
parents:
4945
diff
changeset
|
80 |
@"93919294221991210322351110012010000002111101010111200", |
941f17b2dd9f
disable the two last workinprogress weapons on the ios release
koda
parents:
4945
diff
changeset
|
81 |
@"04050405416006555465544647765766666661555101011154100", |
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
82 |
@"00000000000002055000000400070040000000002000000006000", |
4950
941f17b2dd9f
disable the two last workinprogress weapons on the ios release
koda
parents:
4945
diff
changeset
|
83 |
@"13111103121111111231141111111111111112111111011111200", |
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
84 |
nil] |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
85 |
forKeys: [NSArray arrayWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
86 |
@"ammostore_initialqt", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
87 |
@"ammostore_probability", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
88 |
@"ammostore_delay", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
89 |
@"ammostore_crate", nil]]; |
4281 | 90 |
break; |
91 |
case 1: //crazy |
|
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
92 |
theWeapon = [[NSDictionary alloc] initWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
93 |
[NSArray arrayWithObjects: |
4950
941f17b2dd9f
disable the two last workinprogress weapons on the ios release
koda
parents:
4945
diff
changeset
|
94 |
@"99999999999999999929999999999999992999999999099999900", |
941f17b2dd9f
disable the two last workinprogress weapons on the ios release
koda
parents:
4945
diff
changeset
|
95 |
@"11111101111111111111111111111111111111111111011111100", |
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
96 |
@"00000000000000000000000000000000000000000000000000000", |
4950
941f17b2dd9f
disable the two last workinprogress weapons on the ios release
koda
parents:
4945
diff
changeset
|
97 |
@"13111103121111111231141111111111111112111101011111100", |
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
98 |
nil] |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
99 |
forKeys: [NSArray arrayWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
100 |
@"ammostore_initialqt", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
101 |
@"ammostore_probability", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
102 |
@"ammostore_delay", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
103 |
@"ammostore_crate", nil]]; |
4281 | 104 |
break; |
105 |
case 2: //pro mode |
|
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
106 |
theWeapon = [[NSDictionary alloc] initWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
107 |
[NSArray arrayWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
108 |
@"90900090000000000000090000000000000000000000000000000", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
109 |
@"00000000000000000000000000000000000000000000000000000", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
110 |
@"00000000000002055000000400070040000000002000000000000", |
4950
941f17b2dd9f
disable the two last workinprogress weapons on the ios release
koda
parents:
4945
diff
changeset
|
111 |
@"11111111111111111111111111111111111111111001011111100", |
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
112 |
nil] |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
113 |
forKeys: [NSArray arrayWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
114 |
@"ammostore_initialqt", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
115 |
@"ammostore_probability", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
116 |
@"ammostore_delay", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
117 |
@"ammostore_crate", nil]]; |
4281 | 118 |
break; |
119 |
case 3: //shoppa |
|
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
120 |
theWeapon = [[NSDictionary alloc] initWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
121 |
[NSArray arrayWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
122 |
@"00000099000000000000000000000000000000000000000000000", |
4950
941f17b2dd9f
disable the two last workinprogress weapons on the ios release
koda
parents:
4945
diff
changeset
|
123 |
@"44444100442444022101121212224220000000020004000100100", |
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
124 |
@"00000000000000000000000000000000000000000000000000000", |
4950
941f17b2dd9f
disable the two last workinprogress weapons on the ios release
koda
parents:
4945
diff
changeset
|
125 |
@"11111111111111111111111111111111111111111011011111100", |
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
126 |
nil] |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
127 |
forKeys: [NSArray arrayWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
128 |
@"ammostore_initialqt", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
129 |
@"ammostore_probability", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
130 |
@"ammostore_delay", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
131 |
@"ammostore_crate", nil]]; |
4281 | 132 |
break; |
133 |
case 4: //clean slate |
|
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
134 |
theWeapon = [[NSDictionary alloc] initWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
135 |
[NSArray arrayWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
136 |
@"10100090000100000110000000000000000000000000000010000", |
4950
941f17b2dd9f
disable the two last workinprogress weapons on the ios release
koda
parents:
4945
diff
changeset
|
137 |
@"04050405416006555465544647765766666661555101011154100", |
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
138 |
@"00000000000000000000000000000000000000000000000000000", |
4950
941f17b2dd9f
disable the two last workinprogress weapons on the ios release
koda
parents:
4945
diff
changeset
|
139 |
@"13111103121111111231141111111111111112111111011111100", |
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
140 |
nil] |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
141 |
forKeys: [NSArray arrayWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
142 |
@"ammostore_initialqt", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
143 |
@"ammostore_probability", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
144 |
@"ammostore_delay", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
145 |
@"ammostore_crate", nil]]; |
4281 | 146 |
break; |
147 |
case 5: //minefield |
|
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
148 |
theWeapon = [[NSDictionary alloc] initWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
149 |
[NSArray arrayWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
150 |
@"00000099000900000003000000000000000000000000000000000", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
151 |
@"00000000000000000000000000000000000000000000000000000", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
152 |
@"00000000000002055000000400070040000000002000000006000", |
4950
941f17b2dd9f
disable the two last workinprogress weapons on the ios release
koda
parents:
4945
diff
changeset
|
153 |
@"11111111111111111111111111111111111111111111011111100", |
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
154 |
nil] |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
155 |
forKeys: [NSArray arrayWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
156 |
@"ammostore_initialqt", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
157 |
@"ammostore_probability", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
158 |
@"ammostore_delay", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
159 |
@"ammostore_crate", nil]]; |
4284
57a501a69e5f
update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents:
4281
diff
changeset
|
160 |
break; |
57a501a69e5f
update iFrontend with new schemes and weaps, fix up smaller glitches
koda
parents:
4281
diff
changeset
|
161 |
case 6: //thinking with portals |
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
162 |
theWeapon = [[NSDictionary alloc] initWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
163 |
[NSArray arrayWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
164 |
@"90000090020000000021000000000000001100000900000000000", |
4950
941f17b2dd9f
disable the two last workinprogress weapons on the ios release
koda
parents:
4945
diff
changeset
|
165 |
@"04050405416006555465544647765766666661555101011154100", |
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
166 |
@"00000000000002055000000400070040000000002000000006000", |
4950
941f17b2dd9f
disable the two last workinprogress weapons on the ios release
koda
parents:
4945
diff
changeset
|
167 |
@"13111103121111111231141111111111111112111111011111100", |
4945
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
168 |
nil] |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
169 |
forKeys: [NSArray arrayWithObjects: |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
170 |
@"ammostore_initialqt", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
171 |
@"ammostore_probability", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
172 |
@"ammostore_delay", |
541d35d1f2e8
in the cocoa ammomenu show descriptions properly for lower weapons
koda
parents:
4607
diff
changeset
|
173 |
@"ammostore_crate", nil]]; |
4281 | 174 |
break; |
175 |
} |
|
176 |
||
177 |
NSString *weaponFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", weaponsDirectory, nameWithoutExt]; |
|
178 |
||
179 |
[theWeapon writeToFile:weaponFile atomically:YES]; |
|
180 |
[weaponFile release]; |
|
181 |
[theWeapon release]; |
|
182 |
} |
|
183 |
||
184 |
void createSchemeNamed (NSString *nameWithoutExt) { |
|
185 |
NSString *schemesDirectory = SCHEMES_DIRECTORY(); |
|
186 |
||
187 |
if (![[NSFileManager defaultManager] fileExistsAtPath: schemesDirectory]) { |
|
188 |
[[NSFileManager defaultManager] createDirectoryAtPath:schemesDirectory |
|
189 |
withIntermediateDirectories:NO |
|
190 |
attributes:nil |
|
191 |
error:NULL]; |
|
192 |
} |
|
193 |
||
4607 | 194 |
int basicFlags[] = {100, 100, 45, 15, 47, 5, 100, 5, 35, 25, 3, 4, 0, 2}; |
195 |
BOOL gameFlags[] = {NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, YES, NO, NO, NO, NO, |
|
196 |
NO, NO, NO, NO, NO, NO, NO}; |
|
197 |
||
4281 | 198 |
NSMutableArray *basicArray = [[NSMutableArray alloc] initWithObjects: |
4607 | 199 |
[NSNumber numberWithInt:basicFlags[0]], //initialhealth |
200 |
[NSNumber numberWithInt:basicFlags[1]], //damagemodifier |
|
201 |
[NSNumber numberWithInt:basicFlags[2]], //turntime |
|
202 |
[NSNumber numberWithInt:basicFlags[3]], //suddendeathtimeout |
|
203 |
[NSNumber numberWithInt:basicFlags[4]], //waterrise |
|
204 |
[NSNumber numberWithInt:basicFlags[5]], //healthdecrease |
|
205 |
[NSNumber numberWithInt:basicFlags[6]], //ropelength |
|
206 |
[NSNumber numberWithInt:basicFlags[7]], //cratedrops |
|
207 |
[NSNumber numberWithInt:basicFlags[8]], //healthprob |
|
208 |
[NSNumber numberWithInt:basicFlags[9]], //healthamount |
|
209 |
[NSNumber numberWithInt:basicFlags[10]], //minestime |
|
210 |
[NSNumber numberWithInt:basicFlags[11]], //minesnumber |
|
211 |
[NSNumber numberWithInt:basicFlags[12]], //dudmines |
|
212 |
[NSNumber numberWithInt:basicFlags[13]], //explosives |
|
4281 | 213 |
nil]; |
214 |
||
215 |
NSMutableArray *gamemodArray= [[NSMutableArray alloc] initWithObjects: |
|
4607 | 216 |
[NSNumber numberWithBool:gameFlags[0]], //fortmode |
217 |
[NSNumber numberWithBool:gameFlags[1]], //divideteam |
|
218 |
[NSNumber numberWithBool:gameFlags[2]], //solidland |
|
219 |
[NSNumber numberWithBool:gameFlags[3]], //addborder |
|
220 |
[NSNumber numberWithBool:gameFlags[4]], //lowgravity |
|
221 |
[NSNumber numberWithBool:gameFlags[5]], //lasersight |
|
222 |
[NSNumber numberWithBool:gameFlags[6]], //invulnerable |
|
223 |
[NSNumber numberWithBool:gameFlags[7]], //resethealth |
|
224 |
[NSNumber numberWithBool:gameFlags[8]], //vampirism |
|
225 |
[NSNumber numberWithBool:gameFlags[9]], //karma |
|
226 |
[NSNumber numberWithBool:gameFlags[10]], //artillery |
|
227 |
[NSNumber numberWithBool:gameFlags[11]], //randomorder |
|
228 |
[NSNumber numberWithBool:gameFlags[12]], //king |
|
229 |
[NSNumber numberWithBool:gameFlags[13]], //placehedgehogs |
|
230 |
[NSNumber numberWithBool:gameFlags[14]], //clansharesammo |
|
231 |
[NSNumber numberWithBool:gameFlags[15]], //disablegirders |
|
232 |
[NSNumber numberWithBool:gameFlags[16]], //disablelandobjects |
|
233 |
[NSNumber numberWithBool:gameFlags[17]], //aisurvival |
|
234 |
[NSNumber numberWithBool:gameFlags[18]], //infattack |
|
235 |
[NSNumber numberWithBool:gameFlags[19]], //resetweaps |
|
236 |
[NSNumber numberWithBool:gameFlags[20]], //perhogammo |
|
237 |
[NSNumber numberWithBool:gameFlags[21]], //nowind |
|
238 |
[NSNumber numberWithBool:gameFlags[22]], //morewind |
|
4281 | 239 |
nil]; |
240 |
||
241 |
NSMutableDictionary *theScheme = [[NSMutableDictionary alloc] initWithObjectsAndKeys: |
|
242 |
basicArray,@"basic", |
|
243 |
gamemodArray,@"gamemod", |
|
244 |
nil]; |
|
245 |
[gamemodArray release]; |
|
246 |
[basicArray release]; |
|
247 |
||
248 |
NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", schemesDirectory, nameWithoutExt]; |
|
249 |
||
250 |
[theScheme writeToFile:schemeFile atomically:YES]; |
|
251 |
[schemeFile release]; |
|
252 |
[theScheme release]; |
|
253 |
} |