Ignore:
Timestamp:
02/03/10 14:54:21 (10 years ago)
Author:
maximinus_parpg
Message:

Added Beliars patch for loading / saving.

File:
1 edited

Legend:

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

    r477 r478  
    126126        self.layer_id = agent_layer.getId() 
    127127        self.createBehaviour(agent_layer) 
     128     
     129    def __getstate__(self): 
     130        odict = self.__dict__.copy() 
     131        del odict["behaviour"] 
     132        return odict; 
     133     
     134    def __setstate__(self, state): 
     135        self.__dict__.update(state) 
    128136     
    129137    def meet(self, npc): 
     
    281289        self.dialogue = kwargs.get('dialogue') 
    282290 
     291    def __getstate__(self): 
     292        odict = self.__dict__.copy() 
     293        del odict["behaviour"] 
     294        return odict; 
     295     
     296    def __setstate__(self, state): 
     297        self.__dict__.update(state)         
     298 
    283299    def createBehaviour(self, layer): 
    284300        """Creates the behaviour for this actor. 
Note: See TracChangeset for help on using the changeset viewer.