Changeset 760


Ignore:
Timestamp:
03/01/11 21:30:48 (8 years ago)
Author:
aspidites
Message:

Patch by Aspidites:

+ reverted the definition of FontGlyphs?
+ made it so that leading spaces aren't accidentally trimmed from options

Location:
branches/active/character_customization/game
Files:
2 edited

Legend:

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

    r756 r760  
    5656            @type value: int, float, string, boolean, or list 
    5757        """ 
    58         value = str(value) 
     58        # needed so that the leading space in FontGlyphs isn't accidentally  
     59        # striped 
     60        if not value.startswith(" "): 
     61            value = str(value.strip()) 
     62        else: 
     63            value = str(value) 
     64 
    5965        if value.startswith('[') and value.endswith(']'): 
    6066            value = [item.strip() for item in value[1:-1].split(',')] 
     
    159165                section = line[1:-2] 
    160166            else: 
    161                 option, value = [item.strip() 
    162                                  for item in line.split('=', 1)] 
    163  
     167                option, value = [item for item in line.split(' = ')] 
    164168                setattr(getattr(self, section), option, value) 
    165169 
  • branches/active/character_customization/game/run.py

    r747 r760  
    8383        settings = Settings('./settings.ini') 
    8484 
     85    print settings.fife.FontGlyphs 
    8586    if settings.fife.UsePsyco: 
    8687        # Import Psyco if available 
Note: See TracChangeset for help on using the changeset viewer.