Ignore:
Timestamp:
03/07/11 09:22:08 (9 years ago)
Author:
aspidites
Message:

Patch by Aspidites

  • added "DataDirectory?" option to [fife] section of system.cfg
  • broke down *File options and made additonal *Directory options

where neccessary

  • updated references in source files to comply with these changes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/active/character_customization/game/parpg/gamemodel.py

    r774 r794  
    5555        @type setting: parpg.settings.Settings object 
    5656        @return: None""" 
     57        self.settings = settings 
     58        data_dir = self.settings.fife.DataDirectory 
     59 
    5760        self.map_change = False 
    5861        self.load_saver = False 
    5962        self.savegame = None 
    60         self.game_state = GameState(quests_dir=settings.parpg.QuestsDirectory) 
     63        quests_directory = os.path.join(data_dir, 
     64                                        self.settings.parpg.QuestsDirectory) 
     65        self.game_state = GameState(quests_dir=quests_directory) 
    6166        #self.game_state.quest_engine =  
    6267        #self.game_state.quest_engine.readQuests() 
     
    7378 
    7479        # set values from settings 
    75         self.game_state.maps_file = settings.parpg.MapsFile 
    76         self.all_agents_file = settings.parpg.AllAgentsFile 
    77         self.object_db_file = settings.parpg.ObjectDatabaseFile 
    78         self.agents_directory = settings.parpg.AgentsDirectory 
    79         self.dialogues_directory = settings.parpg.DialoguesDirectory 
     80        maps_file = os.path.join(data_dir, self.settings.parpg.MapsDirectory, 
     81                                 self.settings.parpg.MapsFile) 
     82        self.game_state.maps_file = maps_file 
     83        all_agents_file = os.path.join(data_dir,  
     84                                       self.settings.parpg.MapsDirectory, 
     85                                       self.settings.parpg.AllAgentsFile) 
     86        self.all_agents_file = all_agents_file 
     87        objects_dir = os.path.join(data_dir, 
     88                                    self.settings.parpg.ObjectsDirectory) 
     89        self.objects_directory = objects_dir 
     90        object_db_file = os.path.join(self.objects_directory, 
     91                                      self.settings.parpg.ObjectDatabaseFile) 
     92        self.object_db_file = object_db_file 
     93        dialogues_dir = os.path.join(data_dir,  
     94                                     self.settings.parpg.DialoguesDirectory) 
     95        self.dialogues_directory = dialogues_dir 
    8096        self.dialogues = {} 
    8197        self.agent_import_files = {} 
    82         self.settings = settings 
    8398        self.obj_loader = XMLObjectLoader( 
    8499                                          self.engine.getImagePool(),  
     
    721736    def getAgentImportFiles(self): 
    722737        """Searches the agents directory for import files """ 
    723         files = locateFiles("*.xml", self.agents_directory) 
     738        files = locateFiles("*.xml", self.objects_directory) 
    724739        for xml_file in files: 
    725740            xml_file = os.path.relpath(xml_file).replace("\\", "/") 
Note: See TracChangeset for help on using the changeset viewer.