Changeset 683 for trunk/game/scripts


Ignore:
Timestamp:
12/06/10 04:52:04 (9 years ago)
Author:
technomage
Message:

Patch by Technomage

  • Patched the dialogue files and renamed the (increase|decrease|set)_quest_value DialogueAction? keywords to (increase|decrease|set)_quest_variable. I updated the dialogueactions.py module a few patches ago, but forgot to update the dialogue files!
  • Fixed a bug in the YamlDialogueParser? class in the dialogueparsers.py module that prevented DialogueActions? with a single argument from being correctly parsed; the "keyword: argument" form for declaring DialogueActions? should now be correctly parsed.
File:
1 edited

Legend:

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

    r680 r683  
    154154                               file_contents) 
    155155        lines = file_contents.splitlines() 
    156         max_line_length = 79 
     156        max_line_length = 76 # 79 - 3 chars for escaping newlines 
    157157        for i in range(len(lines)): 
    158158            line = lines[i] 
     
    172172                ) 
    173173                new_lines = text_wrapper.wrap(line) 
    174                 new_lines = new_lines[:1] + [re.sub(r'^(\s*) (.*)$', 
    175                                                    r'\1\ \2', l) for l in 
    176                                              new_lines[1:]] 
     174                new_lines = ( 
     175                    new_lines[:1] + [re.sub(r'^(\s*) (.*)$', r'\1\ \2', l) 
     176                                     for l in new_lines[1:]] 
     177                ) 
    177178                lines[i] = '\\\n'.join(new_lines) 
    178179         
     
    409410              isinstance(arguments, basestring)): 
    410411            # Got a single positional argument. 
    411             args = (arguments) 
     412            args = (arguments,) 
    412413            kwargs = {} 
    413414        elif (not len(arguments) == 2 or not isinstance(arguments[1], dict)): 
Note: See TracChangeset for help on using the changeset viewer.