- Stub for disabling game styles on mobile ios-revival
authorantonc27 <antonc27@mail.ru>
Tue, 03 Nov 2015 01:22:35 +0100
branchios-revival
changeset 11272 bb6c553162c5
parent 11262 6e1aa1144a2b
child 11273 68a0df07382b
- Stub for disabling game styles on mobile
project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m
--- a/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m	Sat Oct 31 04:03:17 2015 +0100
+++ b/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m	Tue Nov 03 01:22:35 2015 +0100
@@ -20,6 +20,7 @@
 #import "SchemeWeaponConfigViewController.h"
 #import <QuartzCore/QuartzCore.h>
 
+#define DISABLED_GAME_STYLES @[@""]
 
 #define LABEL_TAG 57423
 #define TABLE_TAG 45657
@@ -73,7 +74,7 @@
 -(NSArray *)listOfScripts {
     if (listOfScripts == nil)
         self.listOfScripts = [[[NSFileManager defaultManager] contentsOfDirectoryAtPath:SCRIPTS_DIRECTORY() error:NULL]
-                              filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"SELF ENDSWITH '.lua'"]];
+                              filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"SELF ENDSWITH '.lua' AND NOT (SELF IN %@)", DISABLED_GAME_STYLES]];
     return listOfScripts;
 }