From 1bf224b6352ac04d3172cf11b50246ef2e62fce0 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Fri, 16 May 2014 22:29:38 +0200 Subject: [PATCH] I'm too lazy to actually type the KONAMI code --- naja/constants.py | 3 +++ naja/options.py | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/naja/constants.py b/naja/constants.py index bee1ac5..25def14 100644 --- a/naja/constants.py +++ b/naja/constants.py @@ -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 diff --git a/naja/options.py b/naja/options.py index 4c5abea..5c80b1b 100644 --- a/naja/options.py +++ b/naja/options.py @@ -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(): -- 2.34.1