# HG changeset patch # User Stefano Rivera # Date 1302387516 -7200 # Node ID 5f10585934622794ef2a2ec51bb2ac2c8caf5bc0 # Parent f6bd04e5a4145c714c7dff010e15822d4140dfc0 Remove all tails by default diff -r f6bd04e5a414 -r 5f1058593462 data/game.json --- a/data/game.json Sun Apr 10 00:14:30 2011 +0200 +++ b/data/game.json Sun Apr 10 00:18:36 2011 +0200 @@ -1,16 +1,7 @@ { "fox": { "item": null, - "tails" : [ - "shapeshift", - "fireball", - "sprint", - "invisibility", - "flight", - "shield", - "steal", - "lightning" - ], + "tails" : [], "shape": "fox", "cur_health" : 40, "max_health" : 40, diff -r f6bd04e5a414 -r 5f1058593462 skaapsteker/__init__.py --- a/skaapsteker/__init__.py Sun Apr 10 00:14:30 2011 +0200 +++ b/skaapsteker/__init__.py Sun Apr 10 00:18:36 2011 +0200 @@ -1,5 +1,6 @@ options = { 'debug_rects': False, + 'all_tails': False, 'dvorak': False, 'sound': True, } diff -r f6bd04e5a414 -r 5f1058593462 skaapsteker/__main__.py --- a/skaapsteker/__main__.py Sun Apr 10 00:14:30 2011 +0200 +++ b/skaapsteker/__main__.py Sun Apr 10 00:18:36 2011 +0200 @@ -37,6 +37,8 @@ if DEBUG: parser.add_option("--level", type="str", default=None, dest="level", help="Initial level") + parser.add_option("--all-tails", action="store_true", default=False, + dest='all_tails', help="Start with all the tails") parser.add_option("--no-rects", action="store_false", default=True, dest="rects", help="Disable debugging rects") opts, _ = parser.parse_args(args or []) @@ -45,6 +47,7 @@ options['save_location'] = opts.save_location if DEBUG: options['debug_rects'] = opts.rects + options['all_tails'] = opts.all_tails return opts.level diff -r f6bd04e5a414 -r 5f1058593462 skaapsteker/gamestate.py --- a/skaapsteker/gamestate.py Sun Apr 10 00:14:30 2011 +0200 +++ b/skaapsteker/gamestate.py Sun Apr 10 00:18:36 2011 +0200 @@ -2,6 +2,7 @@ import json from . import data +from . import options from .sprites.base import find_sprite @@ -55,6 +56,17 @@ def new_game(self): self.load_game(data.filepath("game.json")) + if options['all_tails']: + self.data['fox']['tails'] += [ + "fireball", + "flight", + "invisibility", + "lightning", + "shapeshift", + "shield", + "sprint", + "steal", + ] self.save_game() def save_game(self):