From: Stefano Rivera Date: Fri, 16 May 2014 20:29:38 +0000 (+0200) Subject: I'm too lazy to actually type the KONAMI code X-Git-Tag: 0.1~185 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=1bf224b6352ac04d3172cf11b50246ef2e62fce0;p=naja.git I'm too lazy to actually type the KONAMI code --- 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():