I'm too lazy to actually type the KONAMI code
authorStefano Rivera <stefano@rivera.za.net>
Fri, 16 May 2014 20:29:38 +0000 (22:29 +0200)
committerStefano Rivera <stefano@rivera.za.net>
Fri, 16 May 2014 20:29:38 +0000 (22:29 +0200)
naja/constants.py
naja/options.py

index bee1ac5177ed7b38a0c94fff19c60a95b3ce8bd5..25def14c1a7c3260b44e01c7756cd4074ebb3d60 100644 (file)
@@ -13,8 +13,11 @@ DEFAULTS = dict(
     debug=False,
     sound=True,
     music=True,
+    # We calculate the default in options.py
+    save_location=None,
     # Debug flags:
     initial_bits=None,
+    cheat_enabled=False,
 )
 
 # Sound constants
index 4c5abea84372449ce6fe57f6390962fb32fbf4b6..5c80b1b32f3cd834fb7ebc5ea4391964a22ade2c 100644 (file)
@@ -35,14 +35,15 @@ def parse_args(args):
     if options.debug:
         parser.add_option('--initial-bits', type=int,
                           help='Initial player bits')
+        parser.add_option('--cheat-enabled', default=False,
+                          action='store_true',
+                          help='For those too lazy to type the KONAMI code')
 
     opts, _ = parser.parse_args(args)
 
     for k in DEFAULTS:
         if getattr(opts, k, None) is not None:
             options[k] = getattr(opts, k)
-    options['save_location'] = opts.save_location
-    options['cheat_enabled'] = False
 
 
 def _get_default_save_location():