Ignore:
Timestamp:
07/02/10 11:55:19 (9 years ago)
Author:
beliar
Message:

Patch by Beliar.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/objects/action.py

    r571 r572  
    144144 
    145145 
    146 class ExamineBoxAction(Action): 
    147     """Examine a box. Needs to be more generic, but will do for now.""" 
     146class ExamineAction(Action): 
     147    """Examine an object.""" 
    148148    def __init__(self, controller, examine_name, examine_desc, commands = None): 
    149149        """ 
     
    159159        @param examine_name: Description of the object to be examined. 
    160160        """ 
    161         super(ExamineBoxAction, self).__init__(controller, commands) 
     161        super(ExamineAction, self).__init__(controller, commands) 
    162162        self.view = controller.view 
    163163        self.examine_name = examine_name 
     
    166166    def execute(self): 
    167167        """Examine the box.""" 
    168         self.view.hud.createExamineBox(self.examine_name, \ 
    169                                               self.examine_desc) 
    170         super(ExamineBoxAction, self).execute() 
     168        action_text = unicode(self.examine_desc) 
     169        self.view.hud.addAction(action_text) 
     170        print action_text 
    171171 
    172172class ReadAction(Action): 
     
    192192    def execute(self): 
    193193        """Examine the box.""" 
    194         print "You read " + self.text_name 
    195         print self.text 
    196         #self.view.hud.createExamineBox(self.text_name, \ 
    197         #                                      self.text) 
     194        action_text = unicode('\n'.join(["You read " + self.text_name + ".",  
     195                                         self.text])) 
     196        self.view.hud.addAction(action_text) 
     197        print action_text 
    198198        super(ReadAction, self).execute() 
    199199 
     
    288288           "Unlock":UnlockBoxAction, 
    289289           "Lock":LockBoxAction, 
    290            "Examine":ExamineBoxAction, 
     290           "Examine":ExamineAction, 
    291291           "Read":ReadAction, 
    292292           "Talk":TalkAction, 
Note: See TracChangeset for help on using the changeset viewer.