Changeset 527


Ignore:
Timestamp:
03/15/10 00:26:51 (9 years ago)
Author:
barra_parpg
Message:

Ticket #250. Patch by qubodup:

  • Adding random audio track playback
  • Code review appreciated!
  • Close[t:250]
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/world.py

    r484 r527  
    1818import time 
    1919import fife 
     20import random 
     21import glob 
     22import os  
    2023from fife.extensions import pychan 
    2124from sounds import SoundEngine 
     
    7073        if TDS.readSetting("PlaySounds") == "1": 
    7174            if not self.sounds.music_init: 
    72                 self.sounds.playMusic("/music/preciouswasteland.ogg") 
     75                self.sounds.playMusic(random.choice(glob.glob(os.path.join("music", "*.ogg"))))  
    7376 
    7477        # The current highlighted object 
Note: See TracChangeset for help on using the changeset viewer.