X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=naja%2Foptions.py;h=498a979d8ecae6299cbf4d5d280b89bd6bfb2a46;hb=de7f100e35ce19c4561d2a0d7ccdc77a38d72381;hp=dd3e69d6904f13e63bb28ebcf5ab35381653bcc0;hpb=5cb3715ac847166eafc970819160792351dee952;p=naja.git diff --git a/naja/options.py b/naja/options.py index dd3e69d..498a979 100644 --- a/naja/options.py +++ b/naja/options.py @@ -30,8 +30,10 @@ def load_deck(parser, deck): ''' from naja.gamestate import GameState try: - state = GameState.new(deck=deck, max_health=4, wins_required=4) + state = GameState.new(deck=deck) except: + if options.debug: + raise parser.error("Could not load deck %r" % (deck,)) options.game_state = state @@ -59,16 +61,20 @@ def parse_args(args): parser.add_option("--save-location", default=_get_default_save_location(), dest="save_location", help="Saved game location") + parser.add_option('--deck', default=None, + help='Start with a new game for a specific deck' + ' (bypassing the menu).') + + parser.add_option('--load', default=None, type=int, + help='Start with a specific save game loaded' + ' (bypassing the menu). Slot values are 0-7.') + 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') - parser.add_option('--deck', default=None, - help='Start with a new game for a specific deck') - parser.add_option('--load', default=None, type=int, - help='Start with a specific save game loaded (0-7)') opts, _ = parser.parse_args(args)