Changeset 674


Ignore:
Timestamp:
11/27/10 22:17:40 (8 years ago)
Author:
technomage
Message:

Patch by Technomage

  • Modified the sha-bang line (#!) of the top-level entry scripts to search for python2 rather than python, since some linux systems now default to python 3.x which would break PARPG on those systems.
  • Some general cleanup of the dialogue_demo.py script.
Location:
trunk/game
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/dialogue_demo.py

    r673 r674  
    1 #!/usr/bin/env python 
     1#!/usr/bin/env python2 
    22 
    33#   This file is part of PARPG. 
     
    5555    This would normally be a container 
    5656    """ 
     57    # States for the mock Box object 
     58    OPENED, CLOSED = range(2) 
     59     
    5760    def __init__(self): 
    58         self.state = 'closed' 
     61        self.state = self.CLOSED 
    5962 
    6063    def isOpen(self): 
    61         if self.state == 'open': 
    62             return self.state 
    63         else: 
    64             return False 
     64        return self.state == self.OPENED 
    6565 
    6666    def isClosed(self): 
    67         if self.state == 'closed': 
    68             return self.state 
    69         else: 
    70             return False 
     67        return self.state == self.CLOSED 
    7168 
    7269    def open(self): 
    73         self.state = 'open' 
     70        self.state = self.OPENED 
    7471        return self.state 
    7572 
    7673    def close(self): 
    77         self.state = 'closed' 
     74        self.state = self.CLOSED 
    7875        return self.state 
    7976 
     
    122119 
    123120if __name__ == "__main__": 
    124     print "1 - Dialogue sample\n2 - Quest Sample" 
     121    print("1 - Dialogue sample\n2 - Quest Sample") 
    125122    choice = input("> ") 
    126123    if choice == 1: 
  • trunk/game/parpg_editor.py

    r643 r674  
    1 #!/usr/bin/env python 
     1#!/usr/bin/env python2 
    22 
    33#   This file is part of PARPG. 
  • trunk/game/run.py

    r661 r674  
    1 #!/usr/bin/env python 
     1#!/usr/bin/env python2 
    22 
    33#   This program is free software: you can redistribute it and/or modify 
  • trunk/game/run_tests.py

    r369 r674  
    1 #!/usr/bin/env python 
     1#!/usr/bin/env python2 
    22 
    33#   This program is free software: you can redistribute it and/or modify 
Note: See TracChangeset for help on using the changeset viewer.