Changeset 292:7b121ed73b95


Ignore:
Timestamp:
Sep 5, 2013, 9:17:02 PM (7 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
Message:

--no-music flag.

Location:
nagslang
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • nagslang/constants.py

    r281 r292  
    77    debug=False,
    88    sound=True,
     9    music=True,
    910)
    1011
  • nagslang/options.py

    r14 r292  
    2828    parser.add_option('--no-sound',
    2929                      dest='sound', action='store_false', default=True,
    30                       help='Disable sound')
     30                      help='Disable all sound, including music')
     31
     32    parser = optparse.OptionParser()
     33    parser.add_option('--no-music',
     34                      dest='music', action='store_false', default=True,
     35                      help='Disable music (but not sound)')
     36
    3137    if options.debug:
    3238        parser.add_option('--area', help='Initial area')
  • nagslang/sound.py

    r269 r292  
    5050
    5151    def play_music(self, name, volume=1.0):
     52        if not options.music:
     53            return
    5254        track_name = resources.get_resource_path("music", name)
    5355        mixer.music.load(track_name)
Note: See TracChangeset for help on using the changeset viewer.