# HG changeset patch # User antonc27 # Date 1442710369 -7200 # Node ID 3dbea499390d864152396bb28c5198960db2799e # Parent fa6f6e8b927c57ef1edbfb7afe0e5d6c656d9d06 - 'Construction Mode' ammo set and game parameters added to iOS front-end diff -r fa6f6e8b927c -r 3dbea499390d project_files/HedgewarsMobile/Classes/CreationChamber.m --- a/project_files/HedgewarsMobile/Classes/CreationChamber.m Sun Sep 20 02:08:12 2015 +0200 +++ b/project_files/HedgewarsMobile/Classes/CreationChamber.m Sun Sep 20 02:52:49 2015 +0200 @@ -57,7 +57,7 @@ [[NSFileManager defaultManager] removeItemAtPath:SCHEMES_DIRECTORY() error:NULL]; NSArray *schemeNames = [[NSArray alloc] initWithObjects:@"Default",@"Pro Mode",@"Shoppa",@"Clean Slate", @"Minefield",@"Barrel Mayhem",@"Tunnel Hogs",@"Fort Mode",@"Timeless", - @"Thinking with Portals",@"King Mode",nil]; + @"Thinking with Portals",@"King Mode",@"Construction Mode",nil]; index = 0; for (NSString *name in schemeNames) [self createSchemeNamed:name ofType:index++]; @@ -65,7 +65,7 @@ // WEAPONS - always overwrite as merge is not needed (missing weaps are 0ed automatically) NSArray *weaponNames = [[NSArray alloc] initWithObjects:@"Default",@"Crazy",@"Pro Mode",@"Shoppa",@"Clean Slate", - @"Minefield",@"Thinking with Portals",@"One of Everything",@"Highlander",nil]; + @"Minefield",@"Thinking with Portals",@"One of Everything",@"Highlander",@"Construction Mode",nil]; index = 0; for (NSString *name in weaponNames) [self createWeaponNamed:name ofType:index++]; @@ -253,6 +253,12 @@ delay = [[NSString alloc] initWithBytes:AMMOLINE_HIGHLANDER_DELAY length:ammolineSize encoding:NSUTF8StringEncoding]; crate = [[NSString alloc] initWithBytes:AMMOLINE_HIGHLANDER_CRATE length:ammolineSize encoding:NSUTF8StringEncoding]; break; + case 9: //construction mode + qt = [[NSString alloc] initWithBytes:AMMOLINE_CONSTRUCTION_QT length:ammolineSize encoding:NSUTF8StringEncoding]; + prob = [[NSString alloc] initWithBytes:AMMOLINE_CONSTRUCTION_PROB length:ammolineSize encoding:NSUTF8StringEncoding]; + delay = [[NSString alloc] initWithBytes:AMMOLINE_CONSTRUCTION_DELAY length:ammolineSize encoding:NSUTF8StringEncoding]; + crate = [[NSString alloc] initWithBytes:AMMOLINE_CONSTRUCTION_CRATE length:ammolineSize encoding:NSUTF8StringEncoding]; + break; } NSDictionary *theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys: qt,@"ammostore_initialqt", @@ -392,6 +398,15 @@ [gamemodArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithBool:YES]]; [gamemodArray replaceObjectAtIndex:12 withObject:[NSNumber numberWithBool:YES]]; break; + case 11: // construction mode + [basicArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithInt:0]]; + [basicArray replaceObjectAtIndex:13 withObject:[NSNumber numberWithInt:0]]; + [gamemodArray replaceObjectAtIndex:11 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:15 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:16 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:18 withObject:[NSNumber numberWithBool:YES]]; + [gamemodArray replaceObjectAtIndex:20 withObject:[NSNumber numberWithBool:YES]]; + break; } NSMutableDictionary *theScheme = [[NSMutableDictionary alloc] initWithObjectsAndKeys: