Ignore:
Timestamp:
03/09/11 05:23:21 (8 years ago)
Author:
aspidites
Message:

Patch by Aspidites

  • Removed SystemDataDirectory? and UserDataDirectory?
    • it is the the settings module's job to keep track of this sort of thing, not fife or PARPG's
    • consequently, setting.py's command line interface became simple
    • this will also prevent those "I generated a settings file but PARPG doesnt run" complaints
    • I think I'm going to have some helper methods to generate platform-specific paths at run-time
  • User data directory is now properly created
  • added platform_paths(system) which returns the platform-specific paths for the given system
  • if no system is given, it gives the paths for the system that the script was run on
  • changed logic of settings.py so that it is not required to pass a path.
  • not passing a path invokes paltform_paths
File:
1 edited

Legend:

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

    r809 r810  
    135135            # F7 saves a screenshot to screenshots directory 
    136136 
    137             fife_ = self.model.settings.fife 
    138             parpg_ = self.model.settings.parpg 
    139             screenshot_directory = os.path.join(fife_.UserDataDirectory, 
    140                                            parpg_.ScreenshotsDirectory) 
     137            settings = self.model.settings 
     138            screenshot_directory = os.path.join(settings.paths['user'], 
     139                                           settings.parpg.ScreenshotsDirectory) 
    141140            # try to create the screenshots directory 
    142141            try: 
     
    258257                direction[0] += 1 
    259258                direction[1] -= 1 
    260                 image = os.path.join(settings.fife.SystemDataDirectory, 
     259                image = os.path.join(settings.paths['system'], 
    261260                                     settings.parpg.GuiDirectory, 
    262261                                     settings.parpg.CursorDirectory, 
     
    267266                direction[0] += 1 
    268267                direction[1] += 1 
    269                 image = os.path.join(settings.fife.SystemDataDirectory, 
     268                image = os.path.join(settings.paths['system'], 
    270269                                     settings.parpg.GuiDirectory, 
    271270                                     settings.parpg.CursorDirectory, 
     
    276275                direction[0] -= 1 
    277276                direction[1] += 1 
    278                 image = os.path.join(settings.fife.SystemDataDirectory, 
     277                image = os.path.join(settings.paths['system'], 
    279278                                     settings.parpg.GuiDirectory, 
    280279                                     settings.parpg.CursorDirectory, 
     
    285284                direction[0] -= 1 
    286285                direction[1] -= 1 
    287                 image = os.path.join(settings.fife.SystemDataDirectory, 
     286                image = os.path.join(settings.paths['system'], 
    288287                                     settings.parpg.GuiDirectory, 
    289288                                     settings.parpg.CursorDirectory, 
Note: See TracChangeset for help on using the changeset viewer.