- Weapon and scheme plist's names(which passed to engine) must contain spaces, not underscores ios-revival
authorantonc27 <antonc27@mail.ru>
Sun, 20 Sep 2015 02:56:33 +0200
branchios-revival
changeset 11189 0fdef687de65
parent 11188 3dbea499390d
child 11190 d77ffd68e1cd
- Weapon and scheme plist's names(which passed to engine) must contain spaces, not underscores
project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m
--- a/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m	Sun Sep 20 02:52:49 2015 +0200
+++ b/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m	Sun Sep 20 02:56:33 2015 +0200
@@ -331,7 +331,8 @@
             {
                 if (![scheme isEqualToString:@"*"])
                 {
-                    self.selectedScheme = [NSString stringWithFormat:@"%@.plist",scheme];
+                    NSString *correctScheme = [scheme stringByReplacingOccurrencesOfString:@"_" withString:@" "];
+                    self.selectedScheme = [NSString stringWithFormat:@"%@.plist", correctScheme];
                 }
                 [self.topControl setEnabled:YES forSegmentAtIndex:0];
             }
@@ -346,7 +347,8 @@
             {
                 if (![weapon isEqualToString:@"*"])
                 {
-                    self.selectedWeapon = [NSString stringWithFormat:@"%@.plist",weapon];
+                    NSString *correctWeapon = [weapon stringByReplacingOccurrencesOfString:@"_" withString:@" "];
+                    self.selectedWeapon = [NSString stringWithFormat:@"%@.plist", correctWeapon];
                 }
                 [self.topControl setEnabled:YES forSegmentAtIndex:1];
             }